scarpe 0.3.0 → 0.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.cursor/rules/commit-style-preferences.mdc +72 -0
- data/.cursor/rules/component_context.mdc +82 -0
- data/.cursor/rules/debug-failed-tests.mdc +100 -0
- data/.cursor/rules/display_service_context.mdc +80 -0
- data/.cursor/rules/event_handling_context.mdc +100 -0
- data/.cursor/rules/git-pager-handling.mdc +64 -0
- data/.cursor/rules/lacci-context.mdc +52 -0
- data/.cursor/rules/scarpe_design_context.mdc +46 -0
- data/.cursor/rules/shoes_compatibility_context.mdc +75 -0
- data/.cursor/rules/timeout_context.mdc +78 -0
- data/.cursor/rules/update_lacci_and_wv.mdc +8 -0
- data/.cursor/rules/what_is_scarpe.mdc +22 -0
- data/.cursor/rules/writing-new-rules.mdc +73 -0
- data/CHANGELOG.md +46 -5
- data/CLAUDE.md +223 -0
- data/Gemfile +2 -2
- data/Gemfile.lock +85 -55
- data/LICENSE.txt +7 -1
- data/README.md +80 -20
- data/Rakefile +73 -14
- data/docs/SCARPE_FEATURES.md +38 -0
- data/docs/_config.yml +13 -0
- data/docs/calzini_components_and_updates.md +78 -0
- data/docs/display_service_separation.md +39 -0
- data/docs/documentation.md +43 -0
- data/docs/event_loops.md +66 -0
- data/docs/image.png +0 -0
- data/docs/index.md +118 -0
- data/docs/lacci.md +121 -0
- data/docs/scarpe_shoes_incompatibilities.md +71 -0
- data/docs/shoes_and_display_events.md +55 -0
- data/docs/shoes_implementations.md +79 -0
- data/docs/static/manual.md +5 -0
- data/docs/static/scarpe-logo.png +0 -0
- data/docs/timeouts_and_handlers.md +66 -0
- data/docs/web_archaeology.md +76 -0
- data/examples/Edit_box_Styles.rb +8 -0
- data/examples/Kerning.rb +7 -0
- data/examples/background_with_image.rb +14 -5
- data/examples/bloopsaphone/working/feepogram.rb +1 -1
- data/examples/bloopsaphone/working/le_dance_des_rubis.rb +135 -0
- data/examples/bloopsaphone/working/pixel_dreams_in_ruby.rb +131 -0
- data/examples/bloopsaphone/working/type_rebellion.rb +157 -0
- data/examples/border.rb +11 -0
- data/examples/check.rb +2 -0
- data/examples/download_and_show_image.rb +3 -0
- data/examples/flags/finland.rb +15 -0
- data/examples/flags/italy.rb +11 -0
- data/examples/flags/mauritius.rb +14 -0
- data/examples/font_family.rb +17 -0
- data/examples/font_shorthand.rb +9 -0
- data/examples/gen.rb +4 -0
- data/examples/internal_link_navigation.rb +19 -0
- data/examples/legacy/not_checked/shoes-manual/append.rb +10 -0
- data/examples/legacy/not_checked/shoes-manual/background_change.rb +12 -0
- data/examples/legacy/not_checked/shoes-manual/background_pattern.rb +5 -0
- data/examples/legacy/not_checked/shoes-manual/basic_app.rb +8 -0
- data/examples/legacy/not_checked/shoes-manual/border.rb +9 -0
- data/examples/legacy/not_checked/shoes-manual/builtins/FONTS.rb +5 -0
- data/examples/legacy/not_checked/shoes-manual/builtins/ask.rb +2 -0
- data/examples/legacy/not_checked/shoes-manual/builtins/ask_color.rb +5 -0
- data/examples/legacy/not_checked/shoes-manual/builtins/ask_open_file.rb +5 -0
- data/examples/legacy/not_checked/shoes-manual/builtins/ask_save_folder.rb +2 -0
- data/examples/legacy/not_checked/shoes-manual/builtins/confirm.rb +4 -0
- data/examples/legacy/not_checked/shoes-manual/builtins/debug.rb +2 -0
- data/examples/legacy/not_checked/shoes-manual/builtins/info.rb +3 -0
- data/examples/legacy/not_checked/shoes-manual/button.rb +9 -0
- data/examples/legacy/not_checked/shoes-manual/clear.rb +7 -0
- data/examples/legacy/not_checked/shoes-manual/custom_header.rb +13 -0
- data/examples/legacy/not_checked/shoes-manual/displace.rb +14 -0
- data/examples/legacy/not_checked/shoes-manual/edit_box.rb +8 -0
- data/examples/legacy/not_checked/shoes-manual/fill_pattern.rb +5 -0
- data/examples/legacy/not_checked/shoes-manual/fonts.rb +7 -0
- data/examples/legacy/not_checked/shoes-manual/gutter.rb +6 -0
- data/examples/legacy/not_checked/shoes-manual/image_web.rb +4 -0
- data/examples/legacy/not_checked/shoes-manual/keypress.rb +7 -0
- data/examples/legacy/not_checked/shoes-manual/list_box.rb +10 -0
- data/examples/legacy/not_checked/shoes-manual/motion.rb +10 -0
- data/examples/legacy/not_checked/shoes-manual/mouse.rb +8 -0
- data/examples/legacy/not_checked/shoes-manual/move.rb +14 -0
- data/examples/legacy/not_checked/shoes-manual/nested_ovals.rb +8 -0
- data/examples/legacy/not_checked/shoes-manual/oval.rb +7 -0
- data/examples/legacy/not_checked/shoes-manual/ovals.rb +6 -0
- data/examples/legacy/not_checked/shoes-manual/ovals_image.rb +8 -0
- data/examples/legacy/not_checked/shoes-manual/prepend.rb +7 -0
- data/examples/legacy/not_checked/shoes-manual/progress_bar.rb +10 -0
- data/examples/legacy/not_checked/shoes-manual/radio.rb +18 -0
- data/examples/legacy/not_checked/shoes-manual/radio_alternative_1.rb +7 -0
- data/examples/legacy/not_checked/shoes-manual/radio_alternative_2.rb +9 -0
- data/examples/legacy/not_checked/shoes-manual/rotate_rectangle.rb +6 -0
- data/examples/legacy/not_checked/shoes-manual/shape.rb +11 -0
- data/examples/legacy/not_checked/shoes-manual/static/avatar.png +0 -0
- data/examples/legacy/not_checked/shoes-manual/stroke.rb +5 -0
- data/examples/legacy/not_checked/shoes-manual/style.rb +3 -0
- data/examples/legacy/not_checked/shoes-manual/style_alternative_1.rb +4 -0
- data/examples/legacy/not_checked/shoes-manual/style_alternative_2.rb +5 -0
- data/examples/legacy/not_checked/shoes-manual/style_length.rb +5 -0
- data/examples/legacy/not_checked/shoes-manual/timer.rb +6 -0
- data/examples/legacy/not_checked/shoes-manual/trigger_window.rb +8 -0
- data/examples/legacy/not_checked/shoes-manual/window_owner.rb +8 -0
- data/examples/legacy/working/shoes_manual/alert_button.rb +2 -0
- data/examples/legacy/working/shoes_manual/animate.rb +7 -0
- data/examples/legacy/working/shoes_manual/background_para.rb +4 -0
- data/examples/legacy/working/shoes_manual/button_alternative.rb +7 -0
- data/examples/legacy/working/shoes_manual/checkbox.rb +17 -0
- data/examples/legacy/working/shoes_manual/download.rb +12 -0
- data/examples/legacy/working/shoes_manual/edit_box.rb +6 -0
- data/examples/legacy/working/shoes_manual/editline.rb +7 -0
- data/examples/legacy/working/shoes_manual/fixed_height.rb +8 -0
- data/examples/legacy/working/shoes_manual/fixed_width.rb +12 -0
- data/examples/legacy/working/shoes_manual/image.rb +5 -0
- data/examples/legacy/working/shoes_manual/instance_variable_check.rb +10 -0
- data/examples/legacy/working/shoes_manual/message.rb +18 -0
- data/examples/legacy/working/shoes_manual/rectangle.rb +6 -0
- data/examples/legacy/working/shoes_manual/save_download.rb +12 -0
- data/examples/legacy/working/shoes_manual/self_check.rb +10 -0
- data/examples/legacy/working/shoes_manual/stack.rb +7 -0
- data/examples/legacy/working/shoes_manual/style_info.rb +8 -0
- data/examples/legacy/working/shoes_manual/utf8_support.rb +8 -0
- data/examples/legacy/working/shoes_manual/width.rb +4 -0
- data/examples/local_assets/multi_image.rb +5 -0
- data/examples/local_assets/small.png +0 -0
- data/examples/local_fonts.rb +3 -0
- data/examples/margin.rb +13 -0
- data/examples/margin_check.rb +27 -0
- data/examples/oval-with-kwargs.rb +3 -0
- data/examples/oval.rb +26 -0
- data/examples/page_navigation_single_app.rb +42 -0
- data/examples/para_font_styles.rb +17 -0
- data/examples/para_font_variant.rb +6 -0
- data/examples/para_fontweight.rb +13 -0
- data/examples/parse_xl_funnies.rb +3 -0
- data/examples/rect.rb +1 -1
- data/examples/scarpe_ext.rb +3 -0
- data/examples/shapes/star.rb +1 -3
- data/examples/shoes_subclass_app.rb +25 -0
- data/examples/spacing.rb +1 -1
- data/examples/span.rb +4 -2
- data/examples/url_routing_example.rb +67 -0
- data/lacci/Gemfile +0 -2
- data/lacci/Gemfile.lock +4 -32
- data/lacci/lacci.gemspec +3 -3
- data/lacci/lib/lacci/scarpe_cli.rb +0 -1
- data/lacci/lib/lacci/version.rb +1 -1
- data/lacci/lib/scarpe/niente/app.rb +12 -1
- data/lacci/lib/scarpe/niente/display_service.rb +5 -1
- data/lacci/lib/scarpe/niente/drawable.rb +2 -0
- data/lacci/lib/scarpe/niente/shoes_spec.rb +10 -5
- data/lacci/lib/scarpe/niente.rb +15 -2
- data/lacci/lib/shoes/app.rb +204 -105
- data/lacci/lib/shoes/constants.rb +24 -2
- data/lacci/lib/shoes/display_service.rb +43 -4
- data/lacci/lib/shoes/drawable.rb +326 -36
- data/lacci/lib/shoes/drawables/arc.rb +4 -26
- data/lacci/lib/shoes/drawables/arrow.rb +3 -23
- data/lacci/lib/shoes/drawables/border.rb +28 -0
- data/lacci/lib/shoes/drawables/button.rb +5 -21
- data/lacci/lib/shoes/drawables/check.rb +7 -3
- data/lacci/lib/shoes/drawables/document_root.rb +4 -4
- data/lacci/lib/shoes/drawables/edit_box.rb +6 -5
- data/lacci/lib/shoes/drawables/edit_line.rb +5 -4
- data/lacci/lib/shoes/drawables/flow.rb +4 -6
- data/lacci/lib/shoes/drawables/font_helper.rb +62 -0
- data/lacci/lib/shoes/drawables/image.rb +2 -2
- data/lacci/lib/shoes/drawables/line.rb +3 -6
- data/lacci/lib/shoes/drawables/link.rb +16 -9
- data/lacci/lib/shoes/drawables/list_box.rb +8 -5
- data/lacci/lib/shoes/drawables/oval.rb +48 -0
- data/lacci/lib/shoes/drawables/para.rb +106 -18
- data/lacci/lib/shoes/drawables/progress.rb +2 -1
- data/lacci/lib/shoes/drawables/radio.rb +5 -3
- data/lacci/lib/shoes/drawables/rect.rb +7 -6
- data/lacci/lib/shoes/drawables/shape.rb +4 -3
- data/lacci/lib/shoes/drawables/slot.rb +102 -9
- data/lacci/lib/shoes/drawables/stack.rb +7 -12
- data/lacci/lib/shoes/drawables/star.rb +9 -31
- data/lacci/lib/shoes/drawables/text_drawable.rb +93 -34
- data/lacci/lib/shoes/drawables/video.rb +3 -2
- data/lacci/lib/shoes/drawables/widget.rb +9 -4
- data/lacci/lib/shoes/drawables.rb +2 -1
- data/lacci/lib/shoes/errors.rb +13 -3
- data/lacci/lib/shoes/margin_helper.rb +79 -0
- data/lacci/lib/shoes.rb +98 -20
- data/lacci/test/.gitignore +1 -0
- data/lacci/test/test_draw_context.rb +167 -0
- data/lacci/test/test_font_helper.rb +57 -0
- data/lacci/test/test_helper.rb +31 -4
- data/lacci/test/test_lacci.rb +93 -6
- data/lacci/test/test_margin_helper.rb +82 -0
- data/lacci/test/test_niente_test_infra.rb +40 -0
- data/lacci/test/test_oval.rb +82 -0
- data/lacci/test/test_parenting.rb +140 -0
- data/lacci/test/test_shoes_errors.rb +15 -13
- data/lacci/test/test_text_drawables.rb +23 -0
- data/lib/scarpe/assets.rb +19 -0
- data/lib/scarpe/cats_cradle.rb +57 -98
- data/lib/scarpe/shoes_spec.rb +24 -44
- data/lib/scarpe/version.rb +1 -1
- data/lib/scarpe/wv/app.rb +1 -0
- data/lib/scarpe/wv/arc.rb +0 -4
- data/lib/scarpe/wv/border.rb +15 -0
- data/lib/scarpe/wv/control_interface.rb +2 -10
- data/lib/scarpe/wv/document_root.rb +2 -2
- data/lib/scarpe/wv/drawable.rb +6 -40
- data/lib/scarpe/wv/edit_box.rb +4 -1
- data/lib/scarpe/wv/edit_line.rb +4 -1
- data/lib/scarpe/wv/image.rb +2 -5
- data/lib/scarpe/wv/link.rb +4 -2
- data/lib/scarpe/wv/oval.rb +13 -0
- data/lib/scarpe/wv/para.rb +1 -0
- data/lib/scarpe/wv/scarpe_extensions.rb +8 -0
- data/lib/scarpe/wv/shape.rb +10 -5
- data/lib/scarpe/wv/text_drawable.rb +72 -14
- data/lib/scarpe/wv/web_wrangler.rb +33 -11
- data/lib/scarpe/wv/webview_local_display.rb +6 -2
- data/lib/scarpe/wv.rb +16 -2
- data/scarpe-components/Gemfile +4 -3
- data/scarpe-components/Gemfile.lock +6 -37
- data/scarpe-components/README.md +2 -2
- data/scarpe-components/assets/bootstrap-themes/bootstrap-cerulean.css +12229 -0
- data/scarpe-components/assets/bootstrap-themes/bootstrap-cosmo.css +11810 -0
- data/scarpe-components/assets/bootstrap-themes/bootstrap-cyborg.css +12210 -0
- data/scarpe-components/assets/bootstrap-themes/bootstrap-darkly.css +12153 -0
- data/scarpe-components/assets/bootstrap-themes/bootstrap-flatly.css +12126 -0
- data/scarpe-components/assets/bootstrap-themes/bootstrap-icons.min.css +5 -0
- data/scarpe-components/assets/bootstrap-themes/bootstrap-journal.css +12099 -0
- data/scarpe-components/assets/bootstrap-themes/bootstrap-litera.css +12211 -0
- data/scarpe-components/assets/bootstrap-themes/bootstrap-lumen.css +12369 -0
- data/scarpe-components/assets/bootstrap-themes/bootstrap-lux.css +11928 -0
- data/scarpe-components/assets/bootstrap-themes/bootstrap-materia.css +13184 -0
- data/scarpe-components/assets/bootstrap-themes/bootstrap-minty.css +12177 -0
- data/scarpe-components/assets/bootstrap-themes/bootstrap-morph.css +12750 -0
- data/scarpe-components/assets/bootstrap-themes/bootstrap-pulse.css +11890 -0
- data/scarpe-components/assets/bootstrap-themes/bootstrap-quartz.css +12622 -0
- data/scarpe-components/assets/bootstrap-themes/bootstrap-sandstone.css +12201 -0
- data/scarpe-components/assets/bootstrap-themes/bootstrap-simplex.css +12186 -0
- data/scarpe-components/assets/bootstrap-themes/bootstrap-sketchy.css +12451 -0
- data/scarpe-components/assets/bootstrap-themes/bootstrap-slate.css +12492 -0
- data/scarpe-components/assets/bootstrap-themes/bootstrap-solar.css +12149 -0
- data/scarpe-components/assets/bootstrap-themes/bootstrap-spacelab.css +12266 -0
- data/scarpe-components/assets/bootstrap-themes/bootstrap-superhero.css +12216 -0
- data/scarpe-components/assets/bootstrap-themes/bootstrap-united.css +12077 -0
- data/scarpe-components/assets/bootstrap-themes/bootstrap-vapor.css +12549 -0
- data/scarpe-components/assets/bootstrap-themes/bootstrap-yeti.css +12325 -0
- data/scarpe-components/assets/bootstrap-themes/bootstrap-zephyr.css +12283 -0
- data/scarpe-components/assets/bootstrap-themes/bootstrap.bundle.min.js +7 -0
- data/scarpe-components/lib/scarpe/components/asset_server.rb +219 -0
- data/scarpe-components/lib/scarpe/components/base64.rb +22 -0
- data/scarpe-components/lib/scarpe/components/calzini/{art_widgets.rb → art_drawables.rb} +42 -18
- data/scarpe-components/lib/scarpe/components/calzini/border.rb +38 -0
- data/scarpe-components/lib/scarpe/components/calzini/button.rb +6 -8
- data/scarpe-components/lib/scarpe/components/calzini/misc.rb +14 -16
- data/scarpe-components/lib/scarpe/components/calzini/para.rb +218 -11
- data/scarpe-components/lib/scarpe/components/calzini/slots.rb +16 -60
- data/scarpe-components/lib/scarpe/components/calzini.rb +88 -1
- data/scarpe-components/lib/scarpe/components/errors.rb +4 -0
- data/scarpe-components/lib/scarpe/components/html.rb +4 -1
- data/scarpe-components/lib/scarpe/components/minitest_export_reporter.rb +11 -3
- data/scarpe-components/lib/scarpe/components/minitest_result.rb +41 -0
- data/scarpe-components/lib/scarpe/components/port_helpers.rb +30 -0
- data/scarpe-components/lib/scarpe/components/print_logger.rb +17 -2
- data/scarpe-components/lib/scarpe/components/process_helpers.rb +37 -0
- data/scarpe-components/lib/scarpe/components/segmented_file_loader.rb +1 -1
- data/scarpe-components/lib/scarpe/components/tiranti.rb +42 -100
- data/scarpe-components/lib/scarpe/components/unit_test_helpers.rb +3 -1
- data/scarpe-components/lib/scarpe/components/version.rb +1 -1
- data/scarpe-components/scarpe-components.gemspec +1 -1
- data/scarpe-components/test/assets/big-image.png +0 -0
- data/scarpe-components/test/assets/big-stylesheet.css +497 -0
- data/scarpe-components/test/assets/little-image.png +0 -0
- data/scarpe-components/test/assets/little-stylesheet.css +1 -0
- data/scarpe-components/test/calzini/test_calzini_art_drawables.rb +7 -7
- data/scarpe-components/test/calzini/test_calzini_button.rb +7 -5
- data/scarpe-components/test/calzini/test_calzini_misc.rb +9 -9
- data/scarpe-components/test/calzini/test_calzini_para.rb +6 -9
- data/scarpe-components/test/calzini/test_calzini_slots.rb +12 -57
- data/scarpe-components/test/calzini/test_calzini_text_drawables.rb +83 -18
- data/scarpe-components/test/calzini/test_various.rb +133 -0
- data/scarpe-components/test/test_asset_server.rb +72 -0
- data/scarpe-components/test/test_components.rb +31 -2
- data/scarpe-components/test/test_helper.rb +0 -1
- data/scarpe-components/test/test_minitest_result.rb +7 -0
- data/scarpe-components/test/test_port_helpers.rb +12 -0
- data/scarpe-components/test/test_segmented_app_files.rb +2 -0
- data/tasks/check_html_fixtures.rb +140 -0
- data/tasks/regenerate_html_fixtures.rb +104 -0
- data/templates/class_template_with_shapes.erb +0 -11
- metadata +225 -39
- data/.rubocop.yml +0 -88
- data/lacci/lib/scarpe/niente/logger.rb +0 -29
- data/lacci/lib/shoes/drawables/span.rb +0 -27
- data/lacci/lib/shoes/spacing.rb +0 -9
- data/lib/scarpe/evented_assertions.rb +0 -121
- data/lib/scarpe/wv/span.rb +0 -44
- data/scarpe-components/lib/scarpe/components/calzini/text_widgets.rb +0 -65
- /data/examples/legacy/{not_checked → working}/shoes3-tests/editline/editline.rb +0 -0
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
require_relative 'feepogram'
|
|
2
|
+
|
|
3
|
+
bloops = Bloops.new
|
|
4
|
+
bloops.tempo = 160 # Slower tempo for dreamy feel
|
|
5
|
+
|
|
6
|
+
song = Feepogram.new(bloops) do
|
|
7
|
+
# Soft percussion
|
|
8
|
+
sound :soft_kick, Bloops::SINE do |s|
|
|
9
|
+
s.volume = 0.3
|
|
10
|
+
s.punch = 0.15
|
|
11
|
+
s.sustain = 0.1
|
|
12
|
+
s.decay = 0.3
|
|
13
|
+
end
|
|
14
|
+
|
|
15
|
+
sound :chimes, Bloops::SINE do |s|
|
|
16
|
+
s.volume = 0.35
|
|
17
|
+
s.punch = 0.1
|
|
18
|
+
s.sustain = 0.8
|
|
19
|
+
s.decay = 0.6
|
|
20
|
+
s.slide = 0.1
|
|
21
|
+
end
|
|
22
|
+
|
|
23
|
+
# Main melody instrument
|
|
24
|
+
sound :crystal, Bloops::SQUARE do |s|
|
|
25
|
+
s.volume = 0.45
|
|
26
|
+
s.punch = 0.1
|
|
27
|
+
s.sustain = 0.4
|
|
28
|
+
s.decay = 0.3
|
|
29
|
+
s.phase = 0.3
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
# Sparkly accent notes
|
|
33
|
+
sound :sparkle, Bloops::SQUARE do |s|
|
|
34
|
+
s.volume = 0.25
|
|
35
|
+
s.punch = 0.1
|
|
36
|
+
s.sustain = 0.1
|
|
37
|
+
s.decay = 0.4
|
|
38
|
+
s.phase = 0.2
|
|
39
|
+
s.lpf = 0.6
|
|
40
|
+
end
|
|
41
|
+
|
|
42
|
+
# Warm bass pad
|
|
43
|
+
sound :dream_pad, Bloops::SINE do |s|
|
|
44
|
+
s.volume = 0.25
|
|
45
|
+
s.sustain = 0.6
|
|
46
|
+
s.decay = 0.4
|
|
47
|
+
s.slide = 0.1
|
|
48
|
+
s.lpf = 0.4
|
|
49
|
+
end
|
|
50
|
+
|
|
51
|
+
def gentle_rhythm
|
|
52
|
+
soft_kick " c 4 4 4 " * 8
|
|
53
|
+
chimes " 4 c6 4 c6 " * 4
|
|
54
|
+
end
|
|
55
|
+
|
|
56
|
+
def dream_bass
|
|
57
|
+
dream_pad %{
|
|
58
|
+
2:c3 2:g3
|
|
59
|
+
2:a3 2:e3
|
|
60
|
+
2:f3 2:c3
|
|
61
|
+
2:g3 2:e3
|
|
62
|
+
}
|
|
63
|
+
end
|
|
64
|
+
|
|
65
|
+
def main_melody
|
|
66
|
+
crystal %{
|
|
67
|
+
c5 4 g5 4 e5 4 c6 g5
|
|
68
|
+
a5 4 e5 4 c5 4 g5 4
|
|
69
|
+
f5 4 c6 4 a5 4 f5 e5
|
|
70
|
+
g5 4 e5 4 c5 4 4 4
|
|
71
|
+
}
|
|
72
|
+
end
|
|
73
|
+
|
|
74
|
+
def sparkle_accent
|
|
75
|
+
sparkle %{
|
|
76
|
+
4 4 c7 4 4 4 e7 4
|
|
77
|
+
4 4 g6 4 4 4 c7 4
|
|
78
|
+
4 4 a6 4 4 4 f7 4
|
|
79
|
+
4 4 e7 4 4 4 g6 4
|
|
80
|
+
}
|
|
81
|
+
end
|
|
82
|
+
|
|
83
|
+
def title_theme
|
|
84
|
+
phrase do
|
|
85
|
+
dream_bass
|
|
86
|
+
gentle_rhythm
|
|
87
|
+
end
|
|
88
|
+
|
|
89
|
+
phrase do
|
|
90
|
+
dream_bass
|
|
91
|
+
gentle_rhythm
|
|
92
|
+
main_melody
|
|
93
|
+
end
|
|
94
|
+
|
|
95
|
+
phrase do
|
|
96
|
+
dream_bass
|
|
97
|
+
gentle_rhythm
|
|
98
|
+
main_melody
|
|
99
|
+
sparkle_accent
|
|
100
|
+
end
|
|
101
|
+
end
|
|
102
|
+
|
|
103
|
+
def peaceful_bridge
|
|
104
|
+
phrase do
|
|
105
|
+
dream_pad %{
|
|
106
|
+
4:c4 4:e4
|
|
107
|
+
4:f4 4:g4
|
|
108
|
+
}
|
|
109
|
+
sparkle " c6 e6 g6 c7 " * 4
|
|
110
|
+
end
|
|
111
|
+
end
|
|
112
|
+
|
|
113
|
+
def outro_fade
|
|
114
|
+
phrase do
|
|
115
|
+
dream_bass
|
|
116
|
+
crystal %{
|
|
117
|
+
c6 g5 e5 c5
|
|
118
|
+
4 4 4 4
|
|
119
|
+
}
|
|
120
|
+
sparkle " c7 g6 e6 c6 "
|
|
121
|
+
end
|
|
122
|
+
end
|
|
123
|
+
|
|
124
|
+
# The composition
|
|
125
|
+
2.times { title_theme }
|
|
126
|
+
peaceful_bridge
|
|
127
|
+
title_theme
|
|
128
|
+
outro_fade
|
|
129
|
+
end
|
|
130
|
+
|
|
131
|
+
song.play
|
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
require_relative 'feepogram'
|
|
2
|
+
|
|
3
|
+
bloops = Bloops.new
|
|
4
|
+
bloops.tempo = 360 # Fast and furious!
|
|
5
|
+
|
|
6
|
+
song = Feepogram.new(bloops) do
|
|
7
|
+
# The mighty kick of rebellion
|
|
8
|
+
sound :boss_kick, Bloops::SQUARE do |s|
|
|
9
|
+
s.volume = 0.8
|
|
10
|
+
s.punch = 0.8
|
|
11
|
+
s.sustain = 0.2
|
|
12
|
+
s.decay = 0.1
|
|
13
|
+
s.phase = 0.2
|
|
14
|
+
end
|
|
15
|
+
|
|
16
|
+
# The snare of defiance
|
|
17
|
+
sound :battle_snare, Bloops::NOISE do |s|
|
|
18
|
+
s.volume = 0.7
|
|
19
|
+
s.punch = 0.6
|
|
20
|
+
s.sustain = 0.1
|
|
21
|
+
s.decay = 0.2
|
|
22
|
+
s.freq = 0.5
|
|
23
|
+
end
|
|
24
|
+
|
|
25
|
+
# The relentless type checker
|
|
26
|
+
sound :type_checker, Bloops::SAWTOOTH do |s|
|
|
27
|
+
s.volume = 0.6
|
|
28
|
+
s.punch = 0.4
|
|
29
|
+
s.sustain = 0.2
|
|
30
|
+
s.decay = 0.1
|
|
31
|
+
s.slide = -0.3 # Menacing downward slide
|
|
32
|
+
end
|
|
33
|
+
|
|
34
|
+
# The sword of dynamic typing
|
|
35
|
+
sound :ruby_sword, Bloops::SQUARE do |s|
|
|
36
|
+
s.volume = 0.6
|
|
37
|
+
s.punch = 0.5
|
|
38
|
+
s.sustain = 0.15
|
|
39
|
+
s.decay = 0.2
|
|
40
|
+
s.phase = 0.3
|
|
41
|
+
s.freq = 0.8
|
|
42
|
+
end
|
|
43
|
+
|
|
44
|
+
# Duck typing power-up
|
|
45
|
+
sound :duck_power, Bloops::SAWTOOTH do |s|
|
|
46
|
+
s.volume = 0.5
|
|
47
|
+
s.punch = 0.3
|
|
48
|
+
s.sustain = 0.4
|
|
49
|
+
s.decay = 0.2
|
|
50
|
+
s.slide = 0.2
|
|
51
|
+
end
|
|
52
|
+
|
|
53
|
+
# The battle cry
|
|
54
|
+
sound :battle_cry, Bloops::SQUARE do |s|
|
|
55
|
+
s.volume = 0.7
|
|
56
|
+
s.punch = 0.5
|
|
57
|
+
s.sustain = 0.3
|
|
58
|
+
s.decay = 0.2
|
|
59
|
+
s.phase = 0.4
|
|
60
|
+
end
|
|
61
|
+
|
|
62
|
+
def intense_beat
|
|
63
|
+
boss_kick " c 4 c 4 c c 4 c " * 4
|
|
64
|
+
battle_snare " 4 c 4 c 4 c c c " * 4
|
|
65
|
+
end
|
|
66
|
+
|
|
67
|
+
def type_checker_attack
|
|
68
|
+
type_checker %{
|
|
69
|
+
c4 c4 g3 g3 c4 c4 g3 g3
|
|
70
|
+
a3 a3 e3 e3 a3 a3 e3 e3
|
|
71
|
+
f3 f3 c3 c3 f3 f3 c3 c3
|
|
72
|
+
g3 g3 d3 d3 g3 g3 d3 d3
|
|
73
|
+
}
|
|
74
|
+
end
|
|
75
|
+
|
|
76
|
+
def ruby_counter_attack
|
|
77
|
+
ruby_sword %{
|
|
78
|
+
c5 g5 c6 g5 c5 g5 c6 g5
|
|
79
|
+
a5 e6 a6 e6 a5 e6 a6 e6
|
|
80
|
+
f5 c6 f6 c6 f5 c6 f6 c6
|
|
81
|
+
g5 d6 g6 d6 g5 d6 g6 d6
|
|
82
|
+
}
|
|
83
|
+
end
|
|
84
|
+
|
|
85
|
+
def duck_typing_combo
|
|
86
|
+
duck_power %{
|
|
87
|
+
8:c6 8:d6 8:e6 8:f6 8:g6 8:a6 8:b6 c7
|
|
88
|
+
8:c7 8:b6 8:a6 8:g6 8:f6 8:e6 8:d6 c6
|
|
89
|
+
8:a5 8:b5 8:c6 8:d6 8:e6 8:f6 8:g6 a6
|
|
90
|
+
8:a6 8:g6 8:f6 8:e6 8:d6 8:c6 8:b5 a5
|
|
91
|
+
}
|
|
92
|
+
end
|
|
93
|
+
|
|
94
|
+
def battle_cry_melody
|
|
95
|
+
battle_cry %{
|
|
96
|
+
c5 4 g5 4 c6 4 g5 c5
|
|
97
|
+
a5 4 e5 4 a5 4 e5 a4
|
|
98
|
+
f5 4 c6 4 f6 4 c6 f5
|
|
99
|
+
g5 4 d6 4 g6 4 d6 g5
|
|
100
|
+
}
|
|
101
|
+
end
|
|
102
|
+
|
|
103
|
+
def intro_phase
|
|
104
|
+
2.times do
|
|
105
|
+
phrase do
|
|
106
|
+
intense_beat
|
|
107
|
+
type_checker_attack
|
|
108
|
+
end
|
|
109
|
+
end
|
|
110
|
+
end
|
|
111
|
+
|
|
112
|
+
def battle_phase
|
|
113
|
+
2.times do
|
|
114
|
+
phrase do
|
|
115
|
+
intense_beat
|
|
116
|
+
type_checker_attack
|
|
117
|
+
ruby_counter_attack
|
|
118
|
+
end
|
|
119
|
+
end
|
|
120
|
+
end
|
|
121
|
+
|
|
122
|
+
def power_up_phase
|
|
123
|
+
phrase do
|
|
124
|
+
intense_beat
|
|
125
|
+
duck_typing_combo
|
|
126
|
+
battle_cry_melody
|
|
127
|
+
end
|
|
128
|
+
end
|
|
129
|
+
|
|
130
|
+
def final_stand
|
|
131
|
+
phrase do
|
|
132
|
+
intense_beat
|
|
133
|
+
type_checker_attack
|
|
134
|
+
ruby_counter_attack
|
|
135
|
+
duck_typing_combo
|
|
136
|
+
battle_cry_melody
|
|
137
|
+
end
|
|
138
|
+
end
|
|
139
|
+
|
|
140
|
+
def victory_outro
|
|
141
|
+
phrase do
|
|
142
|
+
boss_kick " c 4 4 4 "
|
|
143
|
+
ruby_sword " c6 e6 g6 c7 "
|
|
144
|
+
battle_cry " 1:c6 "
|
|
145
|
+
end
|
|
146
|
+
end
|
|
147
|
+
|
|
148
|
+
# The epic battle unfolds!
|
|
149
|
+
intro_phase
|
|
150
|
+
battle_phase
|
|
151
|
+
power_up_phase
|
|
152
|
+
battle_phase
|
|
153
|
+
final_stand
|
|
154
|
+
victory_outro
|
|
155
|
+
end
|
|
156
|
+
|
|
157
|
+
song.play
|
data/examples/border.rb
ADDED
data/examples/check.rb
CHANGED
|
@@ -5,6 +5,8 @@ Shoes.app do
|
|
|
5
5
|
flow { check; para "Kin-Dza-Dza by Georgi Danelia" }
|
|
6
6
|
flow { check; para "Children of Heaven by Majid Majidi" }
|
|
7
7
|
@btn = check; para "The White Balloon by Jafar Panahi"
|
|
8
|
+
@p = para ""
|
|
9
|
+
@btn.click { @p.replace("Clicked! Yay!") }
|
|
8
10
|
flow do
|
|
9
11
|
button "Mark me" do
|
|
10
12
|
@btn.checked = true
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
Shoes.app(title: "Finland", width: 360, height: 220, ) do
|
|
2
|
+
background blue
|
|
3
|
+
stack width: 100, height: 80 do
|
|
4
|
+
background white
|
|
5
|
+
end
|
|
6
|
+
stack width: 100, height: 80, top: 140, left: 0 do
|
|
7
|
+
background white
|
|
8
|
+
end
|
|
9
|
+
stack width: 200, height: 80, top: 0, left: 160 do
|
|
10
|
+
background white
|
|
11
|
+
end
|
|
12
|
+
stack width: 200, height: 80, top: 140, left: 160 do
|
|
13
|
+
background white
|
|
14
|
+
end
|
|
15
|
+
end
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
Shoes.app(title: "Mauritius", height: 300) do
|
|
2
|
+
stack width: 1.0, height: 0.25 do
|
|
3
|
+
background red
|
|
4
|
+
end
|
|
5
|
+
stack width: 1.0, height: 0.25 do
|
|
6
|
+
background blue
|
|
7
|
+
end
|
|
8
|
+
stack width: 1.0, height: 0.25 do
|
|
9
|
+
background yellow
|
|
10
|
+
end
|
|
11
|
+
stack width: 1.0, height: 0.25 do
|
|
12
|
+
background green
|
|
13
|
+
end
|
|
14
|
+
end
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
Shoes.app do
|
|
2
|
+
|
|
3
|
+
para "This is arial" ,size:"40px" , font:"arial"
|
|
4
|
+
|
|
5
|
+
para "This is time new roman" , size:"40px", font:"'Times New Roman'"
|
|
6
|
+
|
|
7
|
+
para "this is cursive", font: "cursive", size:"40px"
|
|
8
|
+
|
|
9
|
+
para "this is pacifico", font: "'Monaco'", size:"40px"
|
|
10
|
+
|
|
11
|
+
para "this is pacifico with quotes which is same", font: "Monaco", size:"40px"
|
|
12
|
+
|
|
13
|
+
para "This is helvetica", font: "Helvetica", size:"40px"
|
|
14
|
+
|
|
15
|
+
para "This is 'Trebuchet MS'", font: "'Trebuchet MS'", size:"40px"
|
|
16
|
+
|
|
17
|
+
end
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
Shoes.app do
|
|
2
|
+
|
|
3
|
+
para "The family is not in font so it will change but size won't" , font:"italic bold 30px" , family:"cursive", size: 20
|
|
4
|
+
|
|
5
|
+
para "because only things things who aren't present in font " , font:"bold", size: "16px"
|
|
6
|
+
|
|
7
|
+
para "will be used as their specific property", font: "cursive italic 20px ", font_weight:"bold"
|
|
8
|
+
|
|
9
|
+
end
|
data/examples/gen.rb
CHANGED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# Test for internal link navigation (issue #569)
|
|
2
|
+
# link(click: "/path") should trigger visit() internally
|
|
3
|
+
|
|
4
|
+
Shoes.app width: 400, height: 300, title: "Internal Link Test" do
|
|
5
|
+
page(:index) do
|
|
6
|
+
title "Page 1"
|
|
7
|
+
para "This is the first page."
|
|
8
|
+
para link("Go to Page 2", click: "/page2")
|
|
9
|
+
end
|
|
10
|
+
|
|
11
|
+
page(:page2) do
|
|
12
|
+
title "Page 2"
|
|
13
|
+
para "You navigated here internally!"
|
|
14
|
+
para link("Back to Page 1", click: "/index")
|
|
15
|
+
end
|
|
16
|
+
|
|
17
|
+
# Start on the index page
|
|
18
|
+
visit(:index)
|
|
19
|
+
end
|