atome 0.5.7.0.3 → 0.3191
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of atome might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/Gemfile +4 -4
- data/README.md +5 -77
- data/Rakefile +7 -502
- data/app_builder_helpers/Rakefile +235 -0
- data/documentation/framework/enhance_atome.md +1 -1
- data/documentation/installation/atome_server.md +1 -66
- data/documentation/tutorials/tutorials.md +0 -7
- data/exe/atome +157 -819
- data/lib/atome/atome_native_extensions.rb +3 -0
- data/lib/atome/extensions/geolocation.rb +1 -1
- data/lib/atome/extensions/ping.rb +11 -10
- data/lib/atome/extensions/sha.rb +6 -8
- data/lib/atome/kernel/atome_genesis.rb +93 -0
- data/lib/atome/kernel/generators/shapes.rb +7 -0
- data/lib/atome/kernel/properties/geometry.rb +120 -0
- data/lib/atome/kernel/universe.rb +24 -295
- data/lib/atome/renderers/headless/headless.rb +0 -0
- data/lib/atome/renderers/headless/properties/generator.rb +0 -0
- data/lib/atome/renderers/opal/atome_opal_extensions.rb +4 -0
- data/lib/{platform_specific → atome/renderers}/opal/extensions/geolocation.rb +1 -1
- data/lib/atome/renderers/opal/extensions/ping.rb +13 -0
- data/lib/atome/renderers/opal/extensions/sha.rb +11 -0
- data/lib/atome/renderers/opal/opal_browser.rb +8 -0
- data/lib/{platform_specific → atome/renderers}/opal/opal_parser.rb +0 -1
- data/lib/atome/renderers/opal/properties/generator.rb +6 -0
- data/lib/atome/renderers/server/server.rb +0 -0
- data/lib/atome/version.rb +1 -2
- data/lib/atome.rb +16 -35
- data/sig/atome.rbs +0 -75
- data/vendor/assets/Guardfile +4 -0
- data/vendor/assets/Rakefile +2 -12
- data/vendor/assets/application/index.rb +2 -7
- data/vendor/assets/build/css/style.css +53 -0
- data/vendor/assets/build/index.html +24 -0
- data/vendor/assets/build/js/application.js +0 -0
- data/vendor/assets/build/js/third_parties/interact.min.js +4 -0
- data/vendor/assets/build/js/third_parties/popmotion.min.js +1 -0
- data/vendor/assets/examples/misc.rb +219 -0
- data/vendor/assets/examples/ping.rb +3 -0
- data/vendor/assets/examples/storage.rb +9 -0
- data/vendor/assets/examples/view_example.rb +21 -0
- data/vendor/assets/server/atome_server.rb +96 -33
- data/vendor/assets/server/config.ru +3 -8
- metadata +69 -512
- data/CHANGELOG.md +0 -21
- data/atome.gemspec +0 -100
- data/documentation/basic.md +0 -241
- data/documentation/deep learning/architecture.txt +0 -3763
- data/documentation/deep learning/atome.png +0 -0
- data/documentation/deep learning/basic_infos.txt +0 -289
- data/documentation/deep learning/example_of_users_code.rb +0 -1810
- data/documentation/deep learning/misc.txt +0 -24
- data/documentation/deep learning/ruby_js_example.rb +0 -272
- data/documentation/deep learning/wasm_script_help.text +0 -14
- data/documentation/installation/buiding_atome.md +0 -307
- data/lib/atome/atome.rb +0 -131
- data/lib/atome/extensions/atome.rb +0 -705
- data/lib/atome/extensions/mathematics.rb +0 -20
- data/lib/atome/genesis/atomes.rb +0 -109
- data/lib/atome/genesis/genesis.rb +0 -272
- data/lib/atome/genesis/particles/atome.rb +0 -4
- data/lib/atome/genesis/particles/communication.rb +0 -43
- data/lib/atome/genesis/particles/effect.rb +0 -14
- data/lib/atome/genesis/particles/event.rb +0 -344
- data/lib/atome/genesis/particles/geometry.rb +0 -31
- data/lib/atome/genesis/particles/hierarchy.rb +0 -105
- data/lib/atome/genesis/particles/identity.rb +0 -82
- data/lib/atome/genesis/particles/material.rb +0 -119
- data/lib/atome/genesis/particles/property.rb +0 -147
- data/lib/atome/genesis/particles/security.rb +0 -77
- data/lib/atome/genesis/particles/spatial.rb +0 -98
- data/lib/atome/genesis/particles/time.rb +0 -4
- data/lib/atome/genesis/particles/utility.rb +0 -261
- data/lib/atome/genesis/presets.rb +0 -10
- data/lib/atome/genesis/sparkle.rb +0 -217
- data/lib/atome/kernel/black_matter.rb +0 -22
- data/lib/atome/presets/atome.rb +0 -79
- data/lib/atome/utilities/color_helper/color/cmyk.rb +0 -263
- data/lib/atome/utilities/color_helper/color/css.rb +0 -7
- data/lib/atome/utilities/color_helper/color/grayscale.rb +0 -197
- data/lib/atome/utilities/color_helper/color/hsl.rb +0 -240
- data/lib/atome/utilities/color_helper/color/palette/adobecolor.rb +0 -260
- data/lib/atome/utilities/color_helper/color/palette/gimp.rb +0 -104
- data/lib/atome/utilities/color_helper/color/palette/monocontrast.rb +0 -164
- data/lib/atome/utilities/color_helper/color/palette.rb +0 -4
- data/lib/atome/utilities/color_helper/color/rgb/colors.rb +0 -167
- data/lib/atome/utilities/color_helper/color/rgb/contrast.rb +0 -57
- data/lib/atome/utilities/color_helper/color/rgb/metallic.rb +0 -28
- data/lib/atome/utilities/color_helper/color/rgb.rb +0 -715
- data/lib/atome/utilities/color_helper/color/yiq.rb +0 -62
- data/lib/atome/utilities/color_helper/color.rb +0 -415
- data/lib/atome/utilities/essentials.rb +0 -70
- data/lib/atome/utilities/sanitizer.rb +0 -13
- data/lib/atome/utilities/security.rb +0 -71
- data/lib/atome/utilities/utilities.rb +0 -656
- data/lib/atome_relative.rb +0 -39
- data/lib/molecules/_deprecated_examples/site.rb +0 -34
- data/lib/molecules/init.rb +0 -31
- data/lib/molecules/intuition/_deprecated_inputs.rb +0 -111
- data/lib/molecules/intuition/_deprecated_toolbox.rb +0 -282
- data/lib/molecules/intuition/utillities.rb +0 -408
- data/lib/platform_specific/opal/atome_opal_extensions.rb +0 -11
- data/lib/platform_specific/opal/extensions/color.rb +0 -30
- data/lib/platform_specific/opal/extensions/js.rb +0 -20
- data/lib/platform_specific/opal/extensions/object.rb +0 -6
- data/lib/platform_specific/opal/extensions/ping.rb +0 -31
- data/lib/platform_specific/opal/extensions/sha.rb +0 -25
- data/lib/platform_specific/opal/opal.rb +0 -5
- data/lib/platform_specific/wasm/atome_wasm_extensions.rb +0 -11
- data/lib/renderers/headless/headless.rb +0 -18
- data/lib/renderers/headless/index.rb +0 -6
- data/lib/renderers/headless/index_relative.rb +0 -6
- data/lib/renderers/headless/utility.rb +0 -6
- data/lib/renderers/html/atome.rb +0 -2
- data/lib/renderers/html/atome_html.rb +0 -22
- data/lib/renderers/html/communication.rb +0 -3
- data/lib/renderers/html/effect.rb +0 -51
- data/lib/renderers/html/event.rb +0 -59
- data/lib/renderers/html/geometry.rb +0 -49
- data/lib/renderers/html/hierarchy.rb +0 -248
- data/lib/renderers/html/html.rb +0 -1688
- data/lib/renderers/html/identity.rb +0 -104
- data/lib/renderers/html/index.rb +0 -19
- data/lib/renderers/html/index_relative.rb +0 -20
- data/lib/renderers/html/material.rb +0 -88
- data/lib/renderers/html/property.rb +0 -52
- data/lib/renderers/html/security.rb +0 -1
- data/lib/renderers/html/spatial.rb +0 -75
- data/lib/renderers/html/time.rb +0 -1
- data/lib/renderers/html/utility.rb +0 -170
- data/lib/renderers/renderer.rb +0 -16
- data/lib/renderers/server/index.rb +0 -4
- data/lib/renderers/server/index_relative.rb +0 -4
- data/lib/renderers/server/utility.rb +0 -4
- data/sig/atome_js.rbs +0 -1
- data/sig/batch.rbs +0 -7
- data/sig/browser_helper.rbs +0 -14
- data/sig/essentials.rbs +0 -11
- data/sig/genesis.rbs +0 -3
- data/sig/global_variables.rbs +0 -1
- data/sig/matrix.rbs +0 -5
- data/sig/object.rbs +0 -7
- data/sig/universe.rbs +0 -3
- data/src/utilities/host_mode.rb +0 -5
- data/vendor/assets/application/examples/affect.rb +0 -8
- data/vendor/assets/application/examples/aid.rb +0 -10
- data/vendor/assets/application/examples/allow_copy.rb +0 -13
- data/vendor/assets/application/examples/allow_system_right_click.rb +0 -16
- data/vendor/assets/application/examples/alternate.rb +0 -36
- data/vendor/assets/application/examples/animation.rb +0 -91
- data/vendor/assets/application/examples/apply.rb +0 -8
- data/vendor/assets/application/examples/atome.rb +0 -5
- data/vendor/assets/application/examples/atome_particle_validation.rb +0 -7
- data/vendor/assets/application/examples/atome_sparkle_use.rb +0 -6
- data/vendor/assets/application/examples/atomizer.rb +0 -86
- data/vendor/assets/application/examples/attach.rb +0 -34
- data/vendor/assets/application/examples/attached.rb +0 -45
- data/vendor/assets/application/examples/b64_to_image.rb +0 -9
- data/vendor/assets/application/examples/basic_understanding.rb +0 -54
- data/vendor/assets/application/examples/behavior.rb +0 -32
- data/vendor/assets/application/examples/blur.rb +0 -26
- data/vendor/assets/application/examples/border.rb +0 -75
- data/vendor/assets/application/examples/browse.rb +0 -17
- data/vendor/assets/application/examples/categories.rb +0 -5
- data/vendor/assets/application/examples/category.rb +0 -16
- data/vendor/assets/application/examples/center.rb +0 -7
- data/vendor/assets/application/examples/clear.rb +0 -96
- data/vendor/assets/application/examples/clones&monitoring.rb +0 -105
- data/vendor/assets/application/examples/code.rb +0 -13
- data/vendor/assets/application/examples/color.rb +0 -54
- data/vendor/assets/application/examples/compute.rb +0 -16
- data/vendor/assets/application/examples/console.rb +0 -4
- data/vendor/assets/application/examples/convert.rb +0 -163
- data/vendor/assets/application/examples/copy.rb +0 -25
- data/vendor/assets/application/examples/copybck.rb +0 -68
- data/vendor/assets/application/examples/css.rb +0 -6
- data/vendor/assets/application/examples/database_handling.rb +0 -39
- data/vendor/assets/application/examples/debug.rb +0 -78
- data/vendor/assets/application/examples/delete.rb +0 -105
- data/vendor/assets/application/examples/dig.rb +0 -13
- data/vendor/assets/application/examples/display.rb +0 -279
- data/vendor/assets/application/examples/display_bck.rb +0 -164
- data/vendor/assets/application/examples/drag.rb +0 -54
- data/vendor/assets/application/examples/drop.rb +0 -35
- data/vendor/assets/application/examples/duplicate.rb +0 -70
- data/vendor/assets/application/examples/edit.rb +0 -24
- data/vendor/assets/application/examples/encode.rb +0 -6
- data/vendor/assets/application/examples/encrypt.rb +0 -6
- data/vendor/assets/application/examples/example.rb +0 -27
- data/vendor/assets/application/examples/executor.rb +0 -36
- data/vendor/assets/application/examples/file.rb +0 -16
- data/vendor/assets/application/examples/fill.rb +0 -23
- data/vendor/assets/application/examples/find.rb +0 -158
- data/vendor/assets/application/examples/fit.rb +0 -26
- data/vendor/assets/application/examples/fonts.rb +0 -15
- data/vendor/assets/application/examples/generator_and_build.rb +0 -15
- data/vendor/assets/application/examples/getter.rb +0 -16
- data/vendor/assets/application/examples/grab.rb +0 -14
- data/vendor/assets/application/examples/gradient.rb +0 -40
- data/vendor/assets/application/examples/group.rb +0 -44
- data/vendor/assets/application/examples/help.rb +0 -17
- data/vendor/assets/application/examples/hierarchy.rb +0 -21
- data/vendor/assets/application/examples/history.rb +0 -32
- data/vendor/assets/application/examples/holder.rb +0 -62
- data/vendor/assets/application/examples/hypertext.rb +0 -113
- data/vendor/assets/application/examples/image.rb +0 -5
- data/vendor/assets/application/examples/import.rb +0 -33
- data/vendor/assets/application/examples/increment.rb +0 -23
- data/vendor/assets/application/examples/infos.rb +0 -10
- data/vendor/assets/application/examples/input.rb +0 -34
- data/vendor/assets/application/examples/int8.rb +0 -17
- data/vendor/assets/application/examples/js&ruby.rb +0 -18
- data/vendor/assets/application/examples/keyboard.rb +0 -59
- data/vendor/assets/application/examples/layout.rb +0 -38
- data/vendor/assets/application/examples/list.rb +0 -72
- data/vendor/assets/application/examples/localstorage.rb +0 -19
- data/vendor/assets/application/examples/login.rb +0 -84
- data/vendor/assets/application/examples/markup.rb +0 -4
- data/vendor/assets/application/examples/match.rb +0 -115
- data/vendor/assets/application/examples/matrix.rb +0 -118
- data/vendor/assets/application/examples/monitor.rb +0 -14
- data/vendor/assets/application/examples/on_resize.rb +0 -7
- data/vendor/assets/application/examples/on_the_fly_ruby_code_loading.rb +0 -9
- data/vendor/assets/application/examples/online.rb +0 -3
- data/vendor/assets/application/examples/opacity.rb +0 -9
- data/vendor/assets/application/examples/over.rb +0 -29
- data/vendor/assets/application/examples/paint.rb +0 -29
- data/vendor/assets/application/examples/particles.rb +0 -4
- data/vendor/assets/application/examples/percent_to_px.rb +0 -4
- data/vendor/assets/application/examples/play.rb +0 -50
- data/vendor/assets/application/examples/preset.rb +0 -33
- data/vendor/assets/application/examples/random.rb +0 -42
- data/vendor/assets/application/examples/raw_html.rb +0 -48
- data/vendor/assets/application/examples/read.rb +0 -13
- data/vendor/assets/application/examples/recorder.rb +0 -74
- data/vendor/assets/application/examples/refresh.rb +0 -62
- data/vendor/assets/application/examples/remove.rb +0 -60
- data/vendor/assets/application/examples/repeat.rb +0 -26
- data/vendor/assets/application/examples/resize.rb +0 -17
- data/vendor/assets/application/examples/scroll.rb +0 -11
- data/vendor/assets/application/examples/security.rb +0 -76
- data/vendor/assets/application/examples/select_text.rb +0 -18
- data/vendor/assets/application/examples/selected.rb +0 -35
- data/vendor/assets/application/examples/server.rb +0 -24
- data/vendor/assets/application/examples/shadow.rb +0 -60
- data/vendor/assets/application/examples/shapes.rb +0 -6
- data/vendor/assets/application/examples/shortcut.rb +0 -25
- data/vendor/assets/application/examples/site.rb +0 -41
- data/vendor/assets/application/examples/size.rb +0 -17
- data/vendor/assets/application/examples/sliders.rb +0 -17
- data/vendor/assets/application/examples/smooth.rb +0 -9
- data/vendor/assets/application/examples/style.rb +0 -4
- data/vendor/assets/application/examples/sub_atome_manipulation.rb +0 -20
- data/vendor/assets/application/examples/svg_img_to_vector.rb +0 -6
- data/vendor/assets/application/examples/svg_vectorizer.rb +0 -21
- data/vendor/assets/application/examples/sync.rb +0 -38
- data/vendor/assets/application/examples/table.rb +0 -76
- data/vendor/assets/application/examples/tagged.rb +0 -24
- data/vendor/assets/application/examples/terminal.rb +0 -4
- data/vendor/assets/application/examples/test.rb +0 -584
- data/vendor/assets/application/examples/text.rb +0 -5
- data/vendor/assets/application/examples/tick.rb +0 -29
- data/vendor/assets/application/examples/tools.rb +0 -666
- data/vendor/assets/application/examples/touch.rb +0 -41
- data/vendor/assets/application/examples/type_mutation.rb +0 -18
- data/vendor/assets/application/examples/unit.rb +0 -14
- data/vendor/assets/application/examples/universe.rb +0 -8
- data/vendor/assets/application/examples/vector.rb +0 -37
- data/vendor/assets/application/examples/video.rb +0 -14
- data/vendor/assets/application/examples/wait.rb +0 -6
- data/vendor/assets/application/examples/www.rb +0 -10
- data/vendor/assets/server/atome_server_wasm.rb +0 -54
- data/vendor/assets/server/capture.rb +0 -10
- data/vendor/assets/server/database.rb +0 -63
- data/vendor/assets/server/eDen.rb +0 -302
- data/vendor/assets/server/extensions.rb +0 -13
- data/vendor/assets/src/css/style.css +0 -167
- data/vendor/assets/src/index.html +0 -45
- data/vendor/assets/src/index_opal.html +0 -40
- data/vendor/assets/src/index_server.html +0 -38
- data/vendor/assets/src/index_server_wasm.html +0 -45
- data/vendor/assets/src/index_wasm.html +0 -50
- data/vendor/assets/src/js/atome/atome.js +0 -506
- data/vendor/assets/src/js/atome/atome_helpers/add_font.js +0 -46
- data/vendor/assets/src/js/atome/atome_helpers/atome_animate.js +0 -65
- data/vendor/assets/src/js/atome/atome_helpers/atome_drag.js +0 -124
- data/vendor/assets/src/js/atome/atome_helpers/atome_drop.js +0 -12
- data/vendor/assets/src/js/atome/atome_helpers/atome_events.js +0 -171
- data/vendor/assets/src/js/atome/atome_helpers/atome_over.js +0 -43
- data/vendor/assets/src/js/atome/atome_helpers/atome_sort.js +0 -20
- data/vendor/assets/src/js/atome/atome_helpers/atome_time.js +0 -10
- data/vendor/assets/src/js/atome/atome_helpers/atome_video.js +0 -12
- data/vendor/assets/src/js/atome/atome_helpers/communication.js +0 -35
- data/vendor/assets/src/js/atome/atome_helpers/file.js +0 -12
- data/vendor/assets/src/js/atome/specific/opal.js +0 -111
- data/vendor/assets/src/js/atome/specific/wasm.js +0 -123
- data/vendor/assets/src/js/molecules/web.js +0 -4
- data/vendor/assets/src/js/third_parties/browser.script.iife.min.js +0 -13
- data/vendor/assets/src/js/third_parties/fabric.min.js +0 -1
- data/vendor/assets/src/js/third_parties/html-to-image.min.js +0 -2
- data/vendor/assets/src/js/third_parties/interact.min.js +0 -3
- data/vendor/assets/src/js/third_parties/jsencrypt.min.js +0 -2
- data/vendor/assets/src/js/third_parties/papaparse.min.js +0 -7
- data/vendor/assets/src/js/third_parties/popmotion.min.js +0 -1
- data/vendor/assets/src/js/third_parties/sortable.min.js +0 -2
- data/vendor/assets/src/js/third_parties/three.min.js +0 -6
- data/vendor/assets/src/js/third_parties/w3color.js +0 -646
- data/vendor/assets/src/js/third_parties/wad.min.js +0 -9
- data/vendor/assets/src/js/third_parties/zim.min.js +0 -1
- data/vendor/assets/src/medias/audios/audio_missing.wav +0 -0
- data/vendor/assets/src/medias/audios/clap.wav +0 -0
- data/vendor/assets/src/medias/audios/cowbell.wav +0 -0
- data/vendor/assets/src/medias/audios/hihat.wav +0 -0
- data/vendor/assets/src/medias/audios/kick.wav +0 -0
- data/vendor/assets/src/medias/audios/riff.m4a +0 -0
- data/vendor/assets/src/medias/audios/snare.wav +0 -0
- data/vendor/assets/src/medias/audios/tom.wav +0 -0
- data/vendor/assets/src/medias/fonts/Roboto/LICENSE.txt +0 -202
- 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/fonts/Roboto_Slab/LICENSE.txt +0 -202
- data/vendor/assets/src/medias/fonts/Roboto_Slab/README.txt +0 -71
- data/vendor/assets/src/medias/fonts/Roboto_Slab/RobotoSlab-VariableFont_wght.ttf +0 -0
- data/vendor/assets/src/medias/fonts/Roboto_Slab/static/RobotoSlab-Black.ttf +0 -0
- data/vendor/assets/src/medias/fonts/Roboto_Slab/static/RobotoSlab-Bold.ttf +0 -0
- data/vendor/assets/src/medias/fonts/Roboto_Slab/static/RobotoSlab-ExtraBold.ttf +0 -0
- data/vendor/assets/src/medias/fonts/Roboto_Slab/static/RobotoSlab-ExtraLight.ttf +0 -0
- data/vendor/assets/src/medias/fonts/Roboto_Slab/static/RobotoSlab-Light.ttf +0 -0
- data/vendor/assets/src/medias/fonts/Roboto_Slab/static/RobotoSlab-Medium.ttf +0 -0
- data/vendor/assets/src/medias/fonts/Roboto_Slab/static/RobotoSlab-Regular.ttf +0 -0
- data/vendor/assets/src/medias/fonts/Roboto_Slab/static/RobotoSlab-SemiBold.ttf +0 -0
- data/vendor/assets/src/medias/fonts/Roboto_Slab/static/RobotoSlab-Thin.ttf +0 -0
- data/vendor/assets/src/medias/images/atome.svg +0 -12
- data/vendor/assets/src/medias/images/ballanim.png +0 -0
- data/vendor/assets/src/medias/images/blank.png +0 -0
- data/vendor/assets/src/medias/images/green_planet.png +0 -0
- data/vendor/assets/src/medias/images/icons/Lowpass.svg +0 -8
- data/vendor/assets/src/medias/images/icons/activate.svg +0 -3
- data/vendor/assets/src/medias/images/icons/audio.svg +0 -7
- data/vendor/assets/src/medias/images/icons/band_pass.svg +0 -8
- data/vendor/assets/src/medias/images/icons/clear.svg +0 -5
- data/vendor/assets/src/medias/images/icons/color.svg +0 -5
- data/vendor/assets/src/medias/images/icons/copy.svg +0 -8
- data/vendor/assets/src/medias/images/icons/create.svg +0 -3
- data/vendor/assets/src/medias/images/icons/delete.svg +0 -8
- data/vendor/assets/src/medias/images/icons/edit-.svg +0 -4
- data/vendor/assets/src/medias/images/icons/edit.svg +0 -4
- data/vendor/assets/src/medias/images/icons/edition.svg +0 -4
- data/vendor/assets/src/medias/images/icons/email.svg +0 -13
- data/vendor/assets/src/medias/images/icons/equalizer-.svg +0 -5
- data/vendor/assets/src/medias/images/icons/equalizer.svg +0 -5
- data/vendor/assets/src/medias/images/icons/filter.svg +0 -4
- data/vendor/assets/src/medias/images/icons/folder.svg +0 -4
- data/vendor/assets/src/medias/images/icons/group.svg +0 -6
- data/vendor/assets/src/medias/images/icons/hamburger.svg +0 -8
- data/vendor/assets/src/medias/images/icons/high_pass.svg +0 -5
- data/vendor/assets/src/medias/images/icons/link.svg +0 -4
- data/vendor/assets/src/medias/images/icons/load.svg +0 -4
- data/vendor/assets/src/medias/images/icons/low_pass.svg +0 -5
- data/vendor/assets/src/medias/images/icons/mail_gray.svg +0 -6
- data/vendor/assets/src/medias/images/icons/mail_green.svg +0 -6
- data/vendor/assets/src/medias/images/icons/mail_orange.svg +0 -6
- data/vendor/assets/src/medias/images/icons/microphone.svg +0 -7
- data/vendor/assets/src/medias/images/icons/midi_in.svg +0 -4
- data/vendor/assets/src/medias/images/icons/midi_out.svg +0 -4
- data/vendor/assets/src/medias/images/icons/modules.svg +0 -11
- data/vendor/assets/src/medias/images/icons/paste.svg +0 -4
- data/vendor/assets/src/medias/images/icons/pause.svg +0 -5
- data/vendor/assets/src/medias/images/icons/play.svg +0 -7
- data/vendor/assets/src/medias/images/icons/record.svg +0 -4
- data/vendor/assets/src/medias/images/icons/save.svg +0 -5
- data/vendor/assets/src/medias/images/icons/select--.svg +0 -4
- data/vendor/assets/src/medias/images/icons/select-.svg +0 -5
- data/vendor/assets/src/medias/images/icons/select-all.svg +0 -4
- data/vendor/assets/src/medias/images/icons/select.svg +0 -4
- data/vendor/assets/src/medias/images/icons/settings.svg +0 -5
- data/vendor/assets/src/medias/images/icons/settings0.svg +0 -2
- data/vendor/assets/src/medias/images/icons/settings1.svg +0 -17
- data/vendor/assets/src/medias/images/icons/settings2.svg +0 -25
- data/vendor/assets/src/medias/images/icons/settings_old.svg +0 -6
- data/vendor/assets/src/medias/images/icons/shape.svg +0 -7
- data/vendor/assets/src/medias/images/icons/speaker.svg +0 -6
- data/vendor/assets/src/medias/images/icons/stop.svg +0 -4
- data/vendor/assets/src/medias/images/icons/tool.svg +0 -7
- data/vendor/assets/src/medias/images/icons/tools.svg +0 -9
- data/vendor/assets/src/medias/images/icons/undo.svg +0 -4
- data/vendor/assets/src/medias/images/icons/undo2.svg +0 -4
- data/vendor/assets/src/medias/images/icons/validate.svg +0 -9
- data/vendor/assets/src/medias/images/icons/vie.svg +0 -3
- data/vendor/assets/src/medias/images/icons/wave-saw.svg +0 -3
- data/vendor/assets/src/medias/images/icons/wave-sine.svg +0 -3
- data/vendor/assets/src/medias/images/icons/wave-square-.svg +0 -4
- data/vendor/assets/src/medias/images/icons/wave-square.svg +0 -3
- data/vendor/assets/src/medias/images/icons/wave-triangle.svg +0 -3
- data/vendor/assets/src/medias/images/icons/waveform-.svg +0 -4
- data/vendor/assets/src/medias/images/icons/waveform.svg +0 -7
- data/vendor/assets/src/medias/images/logos/Facebook.svg +0 -8
- data/vendor/assets/src/medias/images/logos/GitHub Black.svg +0 -7
- data/vendor/assets/src/medias/images/logos/GitHub.svg +0 -7
- data/vendor/assets/src/medias/images/logos/LinkedIn-full.svg +0 -109
- data/vendor/assets/src/medias/images/logos/LinkedIn.svg +0 -11
- data/vendor/assets/src/medias/images/logos/Orange/Facebook.svg +0 -8
- data/vendor/assets/src/medias/images/logos/Orange/TikTok.svg +0 -11
- data/vendor/assets/src/medias/images/logos/Orange/Twitter.svg +0 -8
- data/vendor/assets/src/medias/images/logos/Orange/instagram.svg +0 -8
- data/vendor/assets/src/medias/images/logos/Orange/vimeo.svg +0 -8
- data/vendor/assets/src/medias/images/logos/Orange/youtube.svg +0 -7
- data/vendor/assets/src/medias/images/logos/TikTok.svg +0 -11
- data/vendor/assets/src/medias/images/logos/Twitter.svg +0 -35
- data/vendor/assets/src/medias/images/logos/X.svg +0 -5
- data/vendor/assets/src/medias/images/logos/YouTube.svg +0 -1
- data/vendor/assets/src/medias/images/logos/apple.svg +0 -4
- data/vendor/assets/src/medias/images/logos/atome.svg +0 -12
- data/vendor/assets/src/medias/images/logos/freebsd.png +0 -0
- data/vendor/assets/src/medias/images/logos/freebsd.svg +0 -8
- data/vendor/assets/src/medias/images/logos/gray/Facebook.svg +0 -8
- data/vendor/assets/src/medias/images/logos/gray/TikTok.svg +0 -11
- data/vendor/assets/src/medias/images/logos/gray/Twitter.svg +0 -8
- data/vendor/assets/src/medias/images/logos/gray/instagram.svg +0 -8
- data/vendor/assets/src/medias/images/logos/gray/vimeo.svg +0 -8
- data/vendor/assets/src/medias/images/logos/gray/youtube.svg +0 -7
- data/vendor/assets/src/medias/images/logos/gray/youtube2.svg +0 -13
- data/vendor/assets/src/medias/images/logos/instagram.svg +0 -6
- data/vendor/assets/src/medias/images/logos/tiktok_back.svg +0 -1
- data/vendor/assets/src/medias/images/logos/vimeo.svg +0 -17
- data/vendor/assets/src/medias/images/noise.svg +0 -17
- data/vendor/assets/src/medias/images/red_planet.png +0 -0
- data/vendor/assets/src/medias/images/tile.png +0 -0
- data/vendor/assets/src/medias/texts/lorem.txt +0 -1
- data/vendor/assets/src/medias/utils/infos/color.rb +0 -29
- data/vendor/assets/src/medias/utils/infos/width.rb +0 -25
- data/vendor/assets/src/medias/videos/video_missing.mp4 +0 -0
- data/vendor/assets/src-tauri/.gitignore +0 -4
- data/vendor/assets/src-tauri/Cargo.toml +0 -27
- data/vendor/assets/src-tauri/build.rs +0 -3
- data/vendor/assets/src-tauri/icons/128x128.png +0 -0
- data/vendor/assets/src-tauri/icons/128x128@2x.png +0 -0
- data/vendor/assets/src-tauri/icons/32x32.png +0 -0
- data/vendor/assets/src-tauri/icons/Square107x107Logo.png +0 -0
- data/vendor/assets/src-tauri/icons/Square142x142Logo.png +0 -0
- data/vendor/assets/src-tauri/icons/Square150x150Logo.png +0 -0
- data/vendor/assets/src-tauri/icons/Square284x284Logo.png +0 -0
- data/vendor/assets/src-tauri/icons/Square30x30Logo.png +0 -0
- data/vendor/assets/src-tauri/icons/Square310x310Logo.png +0 -0
- data/vendor/assets/src-tauri/icons/Square44x44Logo.png +0 -0
- data/vendor/assets/src-tauri/icons/Square71x71Logo.png +0 -0
- data/vendor/assets/src-tauri/icons/Square89x89Logo.png +0 -0
- data/vendor/assets/src-tauri/icons/StoreLogo.png +0 -0
- data/vendor/assets/src-tauri/icons/icon.icns +0 -0
- data/vendor/assets/src-tauri/icons/icon.ico +0 -0
- data/vendor/assets/src-tauri/icons/icon.png +0 -0
- data/vendor/assets/src-tauri/src/main.rs +0 -71
- data/vendor/assets/src-tauri/tauri.conf.json +0 -70
- 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
- /data/vendor/assets/{src → build}/favicon.ico +0 -0
- /data/vendor/assets/{src/js/third_parties → build/js}/ping.min.js +0 -0
- /data/vendor/assets/{src → build}/js/third_parties/interact.min.js.map +0 -0
- /data/vendor/assets/{src → build}/js/third_parties/sha256.min.js +0 -0
@@ -1,62 +0,0 @@
|
|
1
|
-
# A colour object representing YIQ (NTSC) colour encoding.
|
2
|
-
class Color::YIQ
|
3
|
-
include Color
|
4
|
-
|
5
|
-
# Creates a YIQ colour object from fractional values 0 .. 1.
|
6
|
-
#
|
7
|
-
# Color::YIQ.new(0.3, 0.2, 0.1)
|
8
|
-
def self.from_fraction(y = 0, i = 0, q = 0, &block)
|
9
|
-
new(y, i, q, 1.0, &block)
|
10
|
-
end
|
11
|
-
|
12
|
-
# Creates a YIQ colour object from percentages 0 .. 100.
|
13
|
-
#
|
14
|
-
# Color::YIQ.new(10, 20, 30)
|
15
|
-
def initialize(y = 0, i = 0, q = 0, radix = 100.0, &block) # :yields self:
|
16
|
-
@y, @i, @q = [ y, i, q ].map { |v| Color.normalize(v / radix) }
|
17
|
-
block.call if block
|
18
|
-
end
|
19
|
-
|
20
|
-
def coerce(other)
|
21
|
-
other.to_yiq
|
22
|
-
end
|
23
|
-
|
24
|
-
def to_yiq
|
25
|
-
self
|
26
|
-
end
|
27
|
-
|
28
|
-
def brightness
|
29
|
-
@y
|
30
|
-
end
|
31
|
-
def to_grayscale
|
32
|
-
Color::GrayScale.new(@y)
|
33
|
-
end
|
34
|
-
alias to_greyscale to_grayscale
|
35
|
-
|
36
|
-
def y
|
37
|
-
@y
|
38
|
-
end
|
39
|
-
def y=(yy)
|
40
|
-
@y = Color.normalize(yy)
|
41
|
-
end
|
42
|
-
def i
|
43
|
-
@i
|
44
|
-
end
|
45
|
-
def i=(ii)
|
46
|
-
@i = Color.normalize(ii)
|
47
|
-
end
|
48
|
-
def q
|
49
|
-
@q
|
50
|
-
end
|
51
|
-
def q=(qq)
|
52
|
-
@q = Color.normalize(qq)
|
53
|
-
end
|
54
|
-
|
55
|
-
def inspect
|
56
|
-
"YIQ [%.2f%%, %.2f%%, %.2f%%]" % [ @y * 100, @i * 100, @q * 100 ]
|
57
|
-
end
|
58
|
-
|
59
|
-
def to_a
|
60
|
-
[ y, i, q ]
|
61
|
-
end
|
62
|
-
end
|
@@ -1,415 +0,0 @@
|
|
1
|
-
# Old code
|
2
|
-
# :title: Color -- Colour Management with Ruby
|
3
|
-
# :main: README.rdoc
|
4
|
-
|
5
|
-
# = Colour Management with Ruby
|
6
|
-
module Color
|
7
|
-
COLOR_VERSION = '1.8'
|
8
|
-
|
9
|
-
class RGB; end
|
10
|
-
|
11
|
-
class CMYK; end
|
12
|
-
|
13
|
-
class HSL; end
|
14
|
-
|
15
|
-
class GrayScale; end
|
16
|
-
|
17
|
-
class YIQ; end
|
18
|
-
|
19
|
-
# The maximum "resolution" for colour math; if any value is less than or
|
20
|
-
# equal to this value, it is treated as zero.
|
21
|
-
COLOR_EPSILON = 1e-5
|
22
|
-
# The tolerance for comparing the components of two colours. In general,
|
23
|
-
# colours are considered equal if all of their components are within this
|
24
|
-
# tolerance value of each other.
|
25
|
-
COLOR_TOLERANCE = 1e-4
|
26
|
-
|
27
|
-
# Compares the +other+ colour to this one. The +other+ colour will be
|
28
|
-
# coerced to the same type as the current colour. Such converted colour
|
29
|
-
# comparisons will always be more approximate than non-converted
|
30
|
-
# comparisons.
|
31
|
-
#
|
32
|
-
# If the +other+ colour cannot be coerced to the current colour class, a
|
33
|
-
# +NoMethodError+ exception will be raised.
|
34
|
-
#
|
35
|
-
# All values are compared as floating-point values, so two colours will be
|
36
|
-
# reported equivalent if all component values are within COLOR_TOLERANCE
|
37
|
-
# of each other.
|
38
|
-
def ==(other)
|
39
|
-
Color.equivalent?(self, other)
|
40
|
-
end
|
41
|
-
|
42
|
-
# The primary name for the colour.
|
43
|
-
def name
|
44
|
-
names.first
|
45
|
-
end
|
46
|
-
|
47
|
-
# All names for the colour.
|
48
|
-
def names
|
49
|
-
self.names = nil unless defined? @names
|
50
|
-
@names
|
51
|
-
end
|
52
|
-
|
53
|
-
def names=(n)
|
54
|
-
# :nodoc:
|
55
|
-
@names = Array(n).flatten.compact.map(&:to_s).map(&:downcase).sort.uniq
|
56
|
-
end
|
57
|
-
|
58
|
-
alias_method :name=, :names=
|
59
|
-
end
|
60
|
-
|
61
|
-
class << Color
|
62
|
-
# Returns +true+ if the value is less than COLOR_EPSILON.
|
63
|
-
def near_zero?(value)
|
64
|
-
(value.abs <= Color::COLOR_EPSILON)
|
65
|
-
end
|
66
|
-
|
67
|
-
# Returns +true+ if the value is within COLOR_EPSILON of zero or less than
|
68
|
-
# zero.
|
69
|
-
def near_zero_or_less?(value)
|
70
|
-
(value < 0.0 or near_zero?(value))
|
71
|
-
end
|
72
|
-
|
73
|
-
# Returns +true+ if the value is within COLOR_EPSILON of one.
|
74
|
-
def near_one?(value)
|
75
|
-
near_zero?(value - 1.0)
|
76
|
-
end
|
77
|
-
|
78
|
-
# Returns +true+ if the value is within COLOR_EPSILON of one or more than
|
79
|
-
# one.
|
80
|
-
def near_one_or_more?(value)
|
81
|
-
(value > 1.0 or near_one?(value))
|
82
|
-
end
|
83
|
-
|
84
|
-
# Returns +true+ if the two values provided are near each other.
|
85
|
-
def near?(x, y)
|
86
|
-
(x - y).abs <= Color::COLOR_TOLERANCE
|
87
|
-
end
|
88
|
-
|
89
|
-
# Returns +true+ if the two colours are roughly equivalent. If colour
|
90
|
-
# conversions are required, this all conversions will be implemented
|
91
|
-
# using the default conversion mechanism.
|
92
|
-
def equivalent?(a, b)
|
93
|
-
return false unless a.kind_of?(Color) && b.kind_of?(Color)
|
94
|
-
a.to_a.zip(a.coerce(b).to_a).all? { |(x, y)| near?(x, y) }
|
95
|
-
end
|
96
|
-
|
97
|
-
# Coerces, if possible, the second given colour object to the first
|
98
|
-
# given colour object type. This will probably involve colour
|
99
|
-
# conversion and therefore a loss of fidelity.
|
100
|
-
def coerce(a, b)
|
101
|
-
a.coerce(b)
|
102
|
-
end
|
103
|
-
|
104
|
-
# Normalizes the value to the range (0.0) .. (1.0).
|
105
|
-
def normalize(value)
|
106
|
-
if near_zero_or_less? value
|
107
|
-
0.0
|
108
|
-
elsif near_one_or_more? value
|
109
|
-
1.0
|
110
|
-
else
|
111
|
-
value
|
112
|
-
end
|
113
|
-
end
|
114
|
-
|
115
|
-
alias normalize_fractional normalize
|
116
|
-
|
117
|
-
# Normalizes the value to the specified range.
|
118
|
-
def normalize_to_range(value, range)
|
119
|
-
range = (range.end..range.begin) if (range.end < range.begin)
|
120
|
-
|
121
|
-
if value <= range.begin
|
122
|
-
range.begin
|
123
|
-
elsif value >= range.end
|
124
|
-
range.end
|
125
|
-
else
|
126
|
-
value
|
127
|
-
end
|
128
|
-
end
|
129
|
-
|
130
|
-
# Normalize the value to the range (0) .. (255).
|
131
|
-
def normalize_byte(value)
|
132
|
-
normalize_to_range(value, 0..255).to_i
|
133
|
-
end
|
134
|
-
|
135
|
-
alias normalize_8bit normalize_byte
|
136
|
-
|
137
|
-
# Normalize the value to the range (0) .. (65535).
|
138
|
-
def normalize_word(value)
|
139
|
-
normalize_to_range(value, 0..65535).to_i
|
140
|
-
end
|
141
|
-
|
142
|
-
alias normalize_16bit normalize_word
|
143
|
-
end
|
144
|
-
require_relative 'color/rgb'
|
145
|
-
require_relative 'color/cmyk'
|
146
|
-
require_relative 'color/grayscale'
|
147
|
-
require_relative 'color/hsl'
|
148
|
-
require_relative 'color/yiq'
|
149
|
-
require_relative 'color/css'
|
150
|
-
# require 'atome/helpers/color_helper/color/rgb'
|
151
|
-
# require 'atome/helpers/color_helper/color/cmyk'
|
152
|
-
# require 'atome/helpers/color_helper/color/grayscale'
|
153
|
-
# require 'atome/helpers/color_helper/color/hsl'
|
154
|
-
# require 'atome/helpers/color_helper/color/yiq'
|
155
|
-
# require 'atome/helpers/color_helper/color/css'
|
156
|
-
|
157
|
-
class << Color
|
158
|
-
def const_missing(name)
|
159
|
-
#:nodoc:
|
160
|
-
case name
|
161
|
-
when "VERSION", :VERSION, "COLOR_TOOLS_VERSION", :COLOR_TOOLS_VERSION
|
162
|
-
warn "Color::#{name} has been deprecated. Use Color::COLOR_VERSION instead."
|
163
|
-
Color::COLOR_VERSION
|
164
|
-
else
|
165
|
-
if Color::RGB.const_defined?(name)
|
166
|
-
warn "Color::#{name} has been deprecated. Use Color::RGB::#{name} instead."
|
167
|
-
Color::RGB.const_get(name)
|
168
|
-
else
|
169
|
-
super
|
170
|
-
end
|
171
|
-
end
|
172
|
-
end
|
173
|
-
|
174
|
-
# Provides a thin veneer over the Color module to make it seem like this
|
175
|
-
# is Color 0.1.0 (a class) and not Color 1.4 (a module). This
|
176
|
-
# "constructor" will be removed in the future.
|
177
|
-
#
|
178
|
-
# mode = :hsl:: +values+ must be an array of [ hue deg, sat %, lum % ].
|
179
|
-
# A Color::HSL object will be created.
|
180
|
-
# mode = :rgb:: +values+ will either be an HTML-style colour string or
|
181
|
-
# an array of [ red, green, blue ] (range 0 .. 255). A
|
182
|
-
# Color::RGB object will be created.
|
183
|
-
# mode = :cmyk:: +values+ must be an array of [ cyan %, magenta %, yellow
|
184
|
-
# %, black % ]. A Color::CMYK object will be created.
|
185
|
-
def new(values, mode = :rgb)
|
186
|
-
warn "Color.new has been deprecated. Use Color::#{mode.to_s.upcase}.new instead."
|
187
|
-
color = case mode
|
188
|
-
when :hsl
|
189
|
-
Color::HSL.new(*values)
|
190
|
-
when :rgb
|
191
|
-
values = [values].flatten
|
192
|
-
if values.size == 1
|
193
|
-
Color::RGB.from_html(*values)
|
194
|
-
else
|
195
|
-
Color::RGB.new(*values)
|
196
|
-
end
|
197
|
-
when :cmyk
|
198
|
-
Color::CMYK.new(*values)
|
199
|
-
end
|
200
|
-
color.to_hsl
|
201
|
-
end
|
202
|
-
end
|
203
|
-
|
204
|
-
|
205
|
-
######################################
|
206
|
-
# new code:
|
207
|
-
|
208
|
-
# # :title: Color -- Colour Management with Ruby
|
209
|
-
# # :main: README.rdoc
|
210
|
-
#
|
211
|
-
# # = Colour Management with Ruby
|
212
|
-
#
|
213
|
-
# module Colour
|
214
|
-
# module Color
|
215
|
-
# COLOR_VERSION = '1.8'
|
216
|
-
#
|
217
|
-
# class RGB; end
|
218
|
-
#
|
219
|
-
# class CMYK; end
|
220
|
-
#
|
221
|
-
# class HSL; end
|
222
|
-
#
|
223
|
-
# class GrayScale; end
|
224
|
-
#
|
225
|
-
# class YIQ; end
|
226
|
-
#
|
227
|
-
# # The maximum "resolution" for colour math; if any value is less than or
|
228
|
-
# # equal to this value, it is treated as zero.
|
229
|
-
# COLOR_EPSILON = 1e-5
|
230
|
-
# # The tolerance for comparing the components of two colours. In general,
|
231
|
-
# # colours are considered equal if all of their components are within this
|
232
|
-
# # tolerance value of each other.
|
233
|
-
# COLOR_TOLERANCE = 1e-4
|
234
|
-
#
|
235
|
-
# # Compares the +other+ colour to this one. The +other+ colour will be
|
236
|
-
# # coerced to the same type as the current colour. Such converted colour
|
237
|
-
# # comparisons will always be more approximate than non-converted
|
238
|
-
# # comparisons.
|
239
|
-
# #
|
240
|
-
# # If the +other+ colour cannot be coerced to the current colour class, a
|
241
|
-
# # +NoMethodError+ exception will be raised.
|
242
|
-
# #
|
243
|
-
# # All values are compared as floating-point values, so two colours will be
|
244
|
-
# # reported equivalent if all component values are within COLOR_TOLERANCE
|
245
|
-
# # of each other.
|
246
|
-
# def ==(other)
|
247
|
-
# Color.equivalent?(self, other)
|
248
|
-
# end
|
249
|
-
#
|
250
|
-
# # The primary name for the colour.
|
251
|
-
# def name
|
252
|
-
# names.first
|
253
|
-
# end
|
254
|
-
#
|
255
|
-
# # All names for the colour.
|
256
|
-
# def names
|
257
|
-
# self.names = nil unless defined? @names
|
258
|
-
# @names
|
259
|
-
# end
|
260
|
-
#
|
261
|
-
# def names=(n)
|
262
|
-
# # :nodoc:
|
263
|
-
# @names = Array(n).flatten.compact.map(&:to_s).map(&:downcase).sort.uniq
|
264
|
-
# end
|
265
|
-
#
|
266
|
-
# alias_method :name=, :names=
|
267
|
-
# end
|
268
|
-
#
|
269
|
-
# class << Color
|
270
|
-
# # Returns +true+ if the value is less than COLOR_EPSILON.
|
271
|
-
# def near_zero?(value)
|
272
|
-
# (value.abs <= Color::COLOR_EPSILON)
|
273
|
-
# end
|
274
|
-
#
|
275
|
-
# # Returns +true+ if the value is within COLOR_EPSILON of zero or less than
|
276
|
-
# # zero.
|
277
|
-
# def near_zero_or_less?(value)
|
278
|
-
# (value < 0.0 or near_zero?(value))
|
279
|
-
# end
|
280
|
-
#
|
281
|
-
# # Returns +true+ if the value is within COLOR_EPSILON of one.
|
282
|
-
# def near_one?(value)
|
283
|
-
# near_zero?(value - 1.0)
|
284
|
-
# end
|
285
|
-
#
|
286
|
-
# # Returns +true+ if the value is within COLOR_EPSILON of one or more than
|
287
|
-
# # one.
|
288
|
-
# def near_one_or_more?(value)
|
289
|
-
# (value > 1.0 or near_one?(value))
|
290
|
-
# end
|
291
|
-
#
|
292
|
-
# # Returns +true+ if the two values provided are near each other.
|
293
|
-
# def near?(x, y)
|
294
|
-
# (x - y).abs <= Color::COLOR_TOLERANCE
|
295
|
-
# end
|
296
|
-
#
|
297
|
-
# # Returns +true+ if the two colours are roughly equivalent. If colour
|
298
|
-
# # conversions are required, this all conversions will be implemented
|
299
|
-
# # using the default conversion mechanism.
|
300
|
-
# def equivalent?(a, b)
|
301
|
-
# return false unless a.kind_of?(Color) && b.kind_of?(Color)
|
302
|
-
# a.to_a.zip(a.coerce(b).to_a).all? { |(x, y)| near?(x, y) }
|
303
|
-
# end
|
304
|
-
#
|
305
|
-
# # Coerces, if possible, the second given colour object to the first
|
306
|
-
# # given colour object type. This will probably involve colour
|
307
|
-
# # conversion and therefore a loss of fidelity.
|
308
|
-
# def coerce(a, b)
|
309
|
-
# a.coerce(b)
|
310
|
-
# end
|
311
|
-
#
|
312
|
-
# # Normalizes the value to the range (0.0) .. (1.0).
|
313
|
-
# def normalize(value)
|
314
|
-
# if near_zero_or_less? value
|
315
|
-
# 0.0
|
316
|
-
# elsif near_one_or_more? value
|
317
|
-
# 1.0
|
318
|
-
# else
|
319
|
-
# value
|
320
|
-
# end
|
321
|
-
# end
|
322
|
-
#
|
323
|
-
# alias normalize_fractional normalize
|
324
|
-
#
|
325
|
-
# # Normalizes the value to the specified range.
|
326
|
-
# def normalize_to_range(value, range)
|
327
|
-
# range = (range.end..range.begin) if (range.end < range.begin)
|
328
|
-
#
|
329
|
-
# if value <= range.begin
|
330
|
-
# range.begin
|
331
|
-
# elsif value >= range.end
|
332
|
-
# range.end
|
333
|
-
# else
|
334
|
-
# value
|
335
|
-
# end
|
336
|
-
# end
|
337
|
-
#
|
338
|
-
# # Normalize the value to the range (0) .. (255).
|
339
|
-
# def normalize_byte(value)
|
340
|
-
# normalize_to_range(value, 0..255).to_i
|
341
|
-
# end
|
342
|
-
#
|
343
|
-
# alias normalize_8bit normalize_byte
|
344
|
-
#
|
345
|
-
# # Normalize the value to the range (0) .. (65535).
|
346
|
-
# def normalize_word(value)
|
347
|
-
# normalize_to_range(value, 0..65535).to_i
|
348
|
-
# end
|
349
|
-
#
|
350
|
-
# alias normalize_16bit normalize_word
|
351
|
-
# end
|
352
|
-
#
|
353
|
-
# require_relative 'color/rgb'
|
354
|
-
# require_relative 'color/cmyk'
|
355
|
-
# require_relative 'color/grayscale'
|
356
|
-
# require_relative 'color/hsl'
|
357
|
-
# require_relative 'color/yiq'
|
358
|
-
# require_relative 'color/css'
|
359
|
-
# # require 'atome/helpers/color_helper/color/rgb'
|
360
|
-
# # require 'atome/helpers/color_helper/color/cmyk'
|
361
|
-
# # require 'atome/helpers/color_helper/color/grayscale'
|
362
|
-
# # require 'atome/helpers/color_helper/color/hsl'
|
363
|
-
# # require 'atome/helpers/color_helper/color/yiq'
|
364
|
-
# # require 'atome/helpers/color_helper/color/css'
|
365
|
-
#
|
366
|
-
# class << Color
|
367
|
-
# def const_missing(name)
|
368
|
-
# #:nodoc:
|
369
|
-
# case name
|
370
|
-
# when "VERSION", :VERSION, "COLOR_TOOLS_VERSION", :COLOR_TOOLS_VERSION
|
371
|
-
# warn "Color::#{name} has been deprecated. Use Color::COLOR_VERSION instead."
|
372
|
-
# Color::COLOR_VERSION
|
373
|
-
# else
|
374
|
-
# if Color::RGB.const_defined?(name)
|
375
|
-
# warn "Color::#{name} has been deprecated. Use Color::RGB::#{name} instead."
|
376
|
-
# Color::RGB.const_get(name)
|
377
|
-
# else
|
378
|
-
# super
|
379
|
-
# end
|
380
|
-
# end
|
381
|
-
# end
|
382
|
-
#
|
383
|
-
# # Provides a thin veneer over the Color module to make it seem like this
|
384
|
-
# # is Color 0.1.0 (a class) and not Color 1.4 (a module). This
|
385
|
-
# # "constructor" will be removed in the future.
|
386
|
-
# #
|
387
|
-
# # mode = :hsl:: +values+ must be an array of [ hue deg, sat %, lum % ].
|
388
|
-
# # A Color::HSL object will be created.
|
389
|
-
# # mode = :rgb:: +values+ will either be an HTML-style colour string or
|
390
|
-
# # an array of [ red, green, blue ] (range 0 .. 255). A
|
391
|
-
# # Color::RGB object will be created.
|
392
|
-
# # mode = :cmyk:: +values+ must be an array of [ cyan %, magenta %, yellow
|
393
|
-
# # %, black % ]. A Color::CMYK object will be created.
|
394
|
-
#
|
395
|
-
# end
|
396
|
-
#
|
397
|
-
# def new(values, mode = :rgb)
|
398
|
-
# warn "Color.new has been deprecated. Use Color::#{mode.to_s.upcase}.new instead."
|
399
|
-
# color = case mode
|
400
|
-
# when :hsl
|
401
|
-
# Colour::Color::HSL.new(*values)
|
402
|
-
# when :rgb
|
403
|
-
# values = [values].flatten
|
404
|
-
# if values.size == 1
|
405
|
-
# Colour::Color::RGB.from_html(*values) # Modification ici
|
406
|
-
# else
|
407
|
-
# Colour::Color::RGB.new(*values) # Et ici
|
408
|
-
# end
|
409
|
-
# when :cmyk
|
410
|
-
# Colour::Color::CMYK.new(*values) # Et ici
|
411
|
-
# end
|
412
|
-
# color.to_hsl
|
413
|
-
# end
|
414
|
-
# end
|
415
|
-
|
@@ -1,70 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
# use to sanitize and secure user input
|
4
|
-
module Essentials
|
5
|
-
corp = <<~STR
|
6
|
-
<g transform="matrix(0.0267056,0,0,0.0267056,18.6376,20.2376)">
|
7
|
-
<g id="shapePath1" transform="matrix(4.16667,0,0,4.16667,-377.307,105.632)">
|
8
|
-
<path d="M629.175,81.832C740.508,190.188 742.921,368.28 634.565,479.613C526.209,590.945 348.116,593.358 236.784,485.002C125.451,376.646 123.038,198.554 231.394,87.221C339.75,-24.111 517.843,-26.524 629.175,81.832Z" style="fill:rgb(201,12,125);"/>
|
9
|
-
</g>
|
10
|
-
<g id="shapePath2" transform="matrix(4.16667,0,0,4.16667,-377.307,105.632)">
|
11
|
-
<path d="M1679.33,410.731C1503.98,413.882 1402.52,565.418 1402.72,691.803C1402.91,818.107 1486.13,846.234 1498.35,1056.78C1501.76,1313.32 1173.12,1490.47 987.025,1492.89C257.861,1502.39 73.275,904.061 71.639,735.381C70.841,653.675 1.164,647.648 2.788,737.449C12.787,1291.4 456.109,1712.79 989.247,1706.24C1570.67,1699.09 1982.31,1234 1965.76,683.236C1961.3,534.95 1835.31,407.931 1679.33,410.731Z" style="fill:rgb(201,12,125);"/>
|
12
|
-
</g>
|
13
|
-
</g>
|
14
|
-
STR
|
15
|
-
|
16
|
-
@default_params = {
|
17
|
-
# Warning : type must be define first
|
18
|
-
render_engines: [:html],
|
19
|
-
image: { type: :image, left: 0, top: 0},
|
20
|
-
table: { type: :table, left: 0, top: 0, option: {}},
|
21
|
-
# FIXME : look at build_atome FIXME to resolve default parent attachment problem
|
22
|
-
video: { type: :video },
|
23
|
-
animation: { type: :animation, attach: :black_matter },
|
24
|
-
element: { type: :element, renderers: [], attach: :black_matter },
|
25
|
-
box: { type: :shape, width: 39, height: 39,
|
26
|
-
apply: [:box_color],
|
27
|
-
left: 0, top: 0 },
|
28
|
-
# intuition: { type: :intuition, width: 39, height: 39,
|
29
|
-
# apply: [:box_color],
|
30
|
-
# left: 0, top: 0, preset: :intuition },
|
31
|
-
vector: { type: :vector, width: 39, height: 39,
|
32
|
-
left: 0, top: 0, preset: :vector, definition: corp },
|
33
|
-
# circle: { type: :shape, width: 39, height: 39, smooth: '100%',
|
34
|
-
# apply: [:circle_color],
|
35
|
-
# left: 0, top: 0, preset: :circle },
|
36
|
-
shape: { type: :shape, width: 39, height: 39,
|
37
|
-
apply: [:shape_color],
|
38
|
-
left: 0, top: 0 },
|
39
|
-
text: { type: :text, component: { size: 12 },left: 0, top: 0,
|
40
|
-
apply: [:text_color],
|
41
|
-
width: :auto, height: :auto, language: :english },
|
42
|
-
drm: { type: :drm, attach: :black_matter },
|
43
|
-
shadow: { type: :shadow, red: 0, green: 0, blue: 0, alpha: 1, blur: 3, left: 3, top: 3 },
|
44
|
-
border: { type: :border, red: 0, green: 0, blue: 0, alpha: 0, pattern: :solid, thickness: 6 },
|
45
|
-
color: { type: :color, red: 0, green: 0, blue: 0, alpha: 1}
|
46
|
-
}
|
47
|
-
|
48
|
-
def self.default_params
|
49
|
-
@default_params
|
50
|
-
end
|
51
|
-
|
52
|
-
def self.new_default_params(new_default)
|
53
|
-
@default_params.merge!(new_default)
|
54
|
-
end
|
55
|
-
|
56
|
-
def validation(atome_instance_var)
|
57
|
-
# TODO: write validation scheme
|
58
|
-
true if atome_instance_var
|
59
|
-
end
|
60
|
-
|
61
|
-
def add_essential_drm(params)
|
62
|
-
essential_drm = { authorisation: { read: [Atome.current_user], write: [Atome.current_user] },
|
63
|
-
atome: { read: [:all], write: [:me] } }
|
64
|
-
params[:drm] = if params[:drm]
|
65
|
-
essential_drm.merge(params[:drm])
|
66
|
-
else
|
67
|
-
essential_drm
|
68
|
-
end
|
69
|
-
end
|
70
|
-
end
|
@@ -1,13 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
# atome sanitizer
|
4
|
-
class Atome
|
5
|
-
private
|
6
|
-
|
7
|
-
def create_color_hash(params)
|
8
|
-
rgb_color = Color::CSS[params].css_rgb
|
9
|
-
split_data = rgb_color.sub('rgb(', '').sub(')', '').gsub(',', '').split('%')
|
10
|
-
{ red: split_data[0].to_f / 100, green: split_data[1].to_f / 100, blue: split_data[2].to_f / 100 }
|
11
|
-
end
|
12
|
-
|
13
|
-
end
|
@@ -1,71 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
# extensions for security
|
4
|
-
class Atome
|
5
|
-
def authorise(autorisations)
|
6
|
-
autorisations[:read]&.each do |k, v|
|
7
|
-
autorisations[:read][k] = Black_matter.encode(v)
|
8
|
-
end
|
9
|
-
autorisations[:write]&.each do |k, v|
|
10
|
-
autorisations[:write][k] = Black_matter.encode(v)
|
11
|
-
end
|
12
|
-
|
13
|
-
@authorisations = autorisations
|
14
|
-
end
|
15
|
-
|
16
|
-
def check_password_destruction(operation, element)
|
17
|
-
return unless @authorisations[:destroy]
|
18
|
-
|
19
|
-
@authorisations[operation].delete(element)
|
20
|
-
end
|
21
|
-
|
22
|
-
def write_auth(element)
|
23
|
-
if (@password && @password[:write]) && @authorisations && @authorisations[:write]
|
24
|
-
if !@authorisations[:write][element]
|
25
|
-
return false
|
26
|
-
elsif @password[:write][element] == @authorisations[:write][element]
|
27
|
-
# we check if we a specific password to read the particle
|
28
|
-
check_password_destruction(:write, element)
|
29
|
-
return true
|
30
|
-
elsif @authorisations[:write][:atome] == @password[:write][:atome]
|
31
|
-
|
32
|
-
puts "#{@authorisations[:write][:atome]} == #{@password[:write][:atome]}"
|
33
|
-
check_password_destruction(:write, element)
|
34
|
-
# we check if we a a password that allow to read the whole atome so all the particles
|
35
|
-
return true
|
36
|
-
else
|
37
|
-
check_password_destruction(:write, element)
|
38
|
-
return false
|
39
|
-
end
|
40
|
-
|
41
|
-
check_password_destruction(:write, element)
|
42
|
-
else
|
43
|
-
true
|
44
|
-
end
|
45
|
-
end
|
46
|
-
|
47
|
-
def read_auth(element)
|
48
|
-
|
49
|
-
if (@password && @password[:read]) && @authorisations && @authorisations[:read]
|
50
|
-
if !@authorisations[:read][element]
|
51
|
-
return false
|
52
|
-
elsif @password[:read][element] == @authorisations[:read][element]
|
53
|
-
check_password_destruction(:read, element)
|
54
|
-
# we check if we a specific password to read the particle
|
55
|
-
return true
|
56
|
-
elsif @authorisations[:read][:atome] == @password[:read][:atome]
|
57
|
-
check_password_destruction(:read, element)
|
58
|
-
# we check if we a a password that allow to read the whole atome so all the particles
|
59
|
-
return true
|
60
|
-
else
|
61
|
-
check_password_destruction(:read, element)
|
62
|
-
|
63
|
-
return false
|
64
|
-
end
|
65
|
-
|
66
|
-
check_password_destruction(:read, element)
|
67
|
-
else
|
68
|
-
true
|
69
|
-
end
|
70
|
-
end
|
71
|
-
end
|