No test data.
| ✓ | roundtrip_audio_def_file_ref | ok |
| ✓ | roundtrip_audio_def_embedded | ok |
| ✓ | polygon_decodes_as_closed_polyline_not_as_polygon_variant | ok |
| ✓ | roundtrip_circle | ok |
| ✓ | roundtrip_ellipse | ok |
| ✓ | roundtrip_conic_gradient_fields | ok |
| ✓ | roundtrip_animation_timeline | ok |
| ✓ | roundtrip_group_with_transform | ok |
| ✓ | roundtrip_image_embedded | ok |
| ✓ | roundtrip_line | ok |
| ✓ | roundtrip_linear_gradient | ok |
| ✓ | roundtrip_nested_groups | ok |
| ✓ | roundtrip_layer_blend_and_clip | ok |
| ✓ | roundtrip_opacity_zero_element | ok |
| ✓ | roundtrip_path_arc | ok |
| ✓ | roundtrip_parametric_circles | ok |
| ✓ | roundtrip_path_cubic_bezier | ok |
| ✓ | roundtrip_path_triangle | ok |
| ✓ | roundtrip_polygon | ok |
| ✓ | roundtrip_radial_gradient | ok |
| ✓ | roundtrip_polyline | ok |
| ✓ | roundtrip_rect_rounded | ok |
| ✓ | roundtrip_quickfunc_badge | ok |
| ✓ | roundtrip_sdf_smooth_union_variadic | ok |
| ✓ | roundtrip_shader_def_fields | ok |
| ✓ | roundtrip_splat | ok |
| ✓ | roundtrip_sdf_subtract | ok |
| ✓ | roundtrip_stroke_dasharray | ok |
| ✓ | roundtrip_text | ok |
| ✓ | roundtrip_use_element | ok |
| ✓ | roundtrip_many_elements_compression_ratio | ok |
| ✓ | tests::element_with_no_matching_track_is_untouched | ok |
| ✓ | tests::animated_translate_adds_onto_existing_static_translate | ok |
| ✓ | tests::group_containing_sdf_and_splat_children_animate_independently_of_the_group | ok |
| ✓ | tests::identity_matrix_check_sanity | ok |
| ✓ | tests::image_opacity_and_transform_animate_like_other_elements | ok |
| ✓ | tests::layer_opacity_field_is_multiplied_directly | ok |
| ✓ | tests::loop_mode_wraps_time_before_evaluating_tracks | ok |
| ✓ | tests::layer_z_index_field_is_overridden_not_composed | ok |
| ✓ | tests::layer_z_index_is_untouched_without_a_track | ok |
| ✓ | tests::mixed_scene_animates_sdf_and_splat_independently | ok |
| ✓ | tests::opacity_track_multiplies_existing_style_opacity | ok |
| ✓ | tests::rotate_delta_pivots_the_whole_statically_positioned_element_around_the_parent_origin | ok |
| ✓ | tests::scene_with_no_tracks_is_returned_unchanged | ok |
| ✓ | tests::tracks_recurse_into_group_children | ok |
| ✓ | tests::sdf_transform_animates_like_other_elements | ok |
| ✓ | tests::splat_fields_are_updated_directly_since_it_has_no_transform | ok |
| ✓ | tests::translate_track_composes_onto_absent_static_transform | ok |
| ✓ | animation::tests::animated_property_byte_roundtrip | ok |
| ✓ | animation::tests::ease_in_out_is_continuous_at_the_midpoint | ok |
| ✓ | animation::tests::easing_byte_roundtrip | ok |
| ✓ | animation::tests::easing_curves_are_monotonic_increasing | ok |
| ✓ | animation::tests::easing_boundaries_are_exact_for_every_curve | ok |
| ✓ | animation::tests::evaluate_applies_the_destination_keyframes_easing | ok |
| ✓ | animation::tests::evaluate_empty_track_returns_none | ok |
| ✓ | animation::tests::evaluate_exact_keyframe_time_returns_its_exact_value | ok |
| ✓ | animation::tests::evaluate_ignores_out_of_order_keyframe_input | ok |
| ✓ | animation::tests::evaluate_single_keyframe_is_constant_everywhere | ok |
| ✓ | animation::tests::evaluate_holds_before_first_and_after_last_keyframe | ok |
| ✓ | animation::tests::evaluate_linear_midpoint_is_the_average | ok |
| ✓ | animation::tests::loop_mode_byte_roundtrip | ok |
| ✓ | animation::tests::max_time_finds_the_latest_keyframe | ok |
| ✓ | animation::tests::scale_and_opacity_identity_is_one_everything_else_is_zero | ok |
| ✓ | animation::tests::loop_wraps_back_to_zero_each_cycle | ok |
| ✓ | animation::tests::once_clamps_at_the_end_instead_of_wrapping | ok |
| ✓ | animation::tests::ping_pong_alternates_forward_and_backward_each_cycle | ok |
| ✓ | animation::tests::z_index_parse_and_dixscript_str_roundtrip | ok |
| ✓ | animation::tests::zero_duration_always_resolves_to_zero | ok |
| ✓ | canvas::tests::explicit_duration_with_no_tracks_is_not_animated | ok |
| ✓ | canvas::tests::new_scene_has_no_animation_by_default | ok |
| ✓ | canvas::tests::tracks_with_explicit_duration_are_animated | ok |
| ✓ | canvas::tests::tracks_without_explicit_duration_infer_it_from_keyframes | ok |
| ✓ | color::tests::bytes | ok |
| ✓ | color::tests::hex3 | ok |
| ✓ | color::tests::hex6 | ok |
| ✓ | gradient::tests::shader_def_id_and_svg_fallback | ok |
| ✓ | color::tests::rgba_f | ok |
| ✓ | color::tests::url_preserved | ok |
| ✓ | gradient::tests::stop_roundtrip | ok |
| ✓ | layer::layer_reorder_tests::equal_z_index_keeps_original_document_order | ok |
| ✓ | layer::layer_reorder_tests::non_layer_elements_keep_their_exact_slots | ok |
| ✓ | layer::layer_reorder_tests::two_layers_reorder_by_z_index_regardless_of_document_order | ok |
| ✓ | layer::layer_reorder_tests::zero_or_one_layer_is_returned_unchanged | ok |
| ✓ | media::tests::anchor_byte_roundtrip | ok |
| ✓ | media::tests::anchor_dixscript_str_roundtrip | ok |
| ✓ | media::tests::bottom_right_anchor_offsets_by_full_extent | ok |
| ✓ | media::tests::center_anchor_offsets_by_half_extent | ok |
| ✓ | media::tests::garbage_sniffs_as_none | ok |
| ✓ | media::tests::jpeg_signature_sniffs_as_jpeg | ok |
| ✓ | media::tests::id3_tagged_mp3_sniffs_as_mp3 | ok |
| ✓ | media::tests::ogg_signature_sniffs_as_ogg | ok |
| ✓ | media::tests::png_signature_sniffs_as_png | ok |
| ✓ | media::tests::short_input_does_not_panic | ok |
| ✓ | media::tests::top_left_anchor_is_the_identity | ok |
| ✓ | media::tests::unrecognized_anchor_string_falls_back_to_top_left | ok |
| ✓ | media::tests::wav_signature_sniffs_as_wav | ok |
| ✓ | path::tests::arc_flags | ok |
| ✓ | path::tests::d_string_roundtrip | ok |
| ✓ | path::tests::triangle | ok |
| ✓ | primitives::tests::bbox_expand | ok |
| ✓ | primitives::tests::distance | ok |
| ✓ | primitives::tests::fmt_strips | ok |
| ✓ | primitives::tests::viewbox_rt | ok |
| ✓ | sdf::tests::sdf_tree_constructs | ok |
| ✓ | media::tests::bare_mp3_frame_sync_sniffs_as_none | ok |
| ✓ | sdf::tests::smooth_union_preserves_k | ok |
| ✓ | splat::tests::center_is_one | ok |
| ✓ | splat::tests::effective_radius_range | ok |
| ✓ | splat::tests::falls_off_at_sigma | ok |
| ✓ | style::tests::fillrule_rt | ok |
| ✓ | sdf::tests::subtract_chaining | ok |
| ✓ | style::tests::flags_fill_only | ok |
| ✓ | path::tests::relative_preserved | ok |
| ✓ | style::tests::fw_normal_omitted | ok |
| ✓ | style::tests::linecap_all | ok |
| ✓ | style::tests::opacity_1_omitted | ok |
| ✓ | style::tests::opacity_half_present | ok |
| ✓ | style::tests::ta_start_omitted | ok |
| ✓ | transform::tests::identity_concat | ok |
| ✓ | transform::tests::parse_translate | ok |
| ✓ | transform::tests::matrix_bytes | ok |
| ✓ | transform::tests::rotate_90 | ok |
| ✓ | transform::tests::svg_attr_rt | ok |
| ✓ | compiler::tests::compile_elem_count_in_header | ok |
| ✓ | compiler::tests::compile_header_dimensions | ok |
| ✓ | compiler::tests::compile_produces_valid_header_magic | ok |
| ✓ | compiler::tests::compile_uncompressed_no_compress_flag | ok |
| ✓ | compiler::tests::explicit_duration_and_loop_mode_survive_with_no_tracks | ok |
| ✓ | compiler::tests::compile_compressed_sets_flag | ok |
| ✓ | compiler::tests::audio_def_roundtrips | ok |
| ✓ | compiler::tests::animation_tracks_survive_roundtrip | ok |
| ✓ | compiler::tests::image_element_with_embedded_source_roundtrips | ok |
| ✓ | compiler::tests::rect_ry_none_does_not_inherit_rx | ok |
| ✓ | compiler::tests::path_d_raw_survives_roundtrip_byte_for_byte | ok |
| ✓ | compiler::tests::image_element_with_file_ref_source_roundtrips | ok |
| ✓ | compiler::tests::scene_without_animation_is_unaffected | ok |
| ✓ | decoder::tests::font_weight_none_roundtrips_as_none | ok |
| ✓ | decoder::tests::paint_color_roundtrip | ok |
| ✓ | decoder::tests::paint_currentcolor_rt | ok |
| ✓ | decoder::tests::paint_none_roundtrip | ok |
| ✓ | decoder::tests::paint_ref_roundtrip | ok |
| ✓ | decoder::tests::string_pool_roundtrip | ok |
| ✓ | decoder::tests::style_roundtrip | ok |
| ✓ | decoder::tests::text_anchor_none_roundtrips_as_none | ok |
| ✓ | decoder::tests::transform_rotate_with_center_roundtrip | ok |
| ✓ | decoder::tests::transform_translate_roundtrip | ok |
| ✓ | effect_codec::tests::blur_roundtrip | ok |
| ✓ | effect_codec::tests::drop_shadow_roundtrip | ok |
| ✓ | effect_codec::tests::outer_glow_roundtrip | ok |
| ✓ | encoder::tests::intern_string_deduplicates | ok |
| ✓ | encoder::tests::write_paint_color | ok |
| ✓ | encoder::tests::write_paint_none_is_single_byte | ok |
| ✓ | encoder::tests::write_u16_le | ok |
| ✓ | header::tests::animations_flag_roundtrips | ok |
| ✓ | header::tests::bad_magic_rejected | ok |
| ✓ | header::tests::bad_version_rejected | ok |
| ✓ | header::tests::serialize_parse_roundtrip | ok |
| ✓ | path_codec::tests::arc_roundtrip | ok |
| ✓ | path_codec::tests::binary_roundtrip | ok |
| ✓ | sdf_codec::tests::circle_roundtrip | ok |
| ✓ | sdf_codec::tests::nested_subtract_roundtrip | ok |
| ✓ | sdf_codec::tests::smooth_union_roundtrip | ok |
| ✓ | compiler::tests::splat_fill_roundtrips_both_present_and_absent | ok |
| ✓ | compiler::tests::sdf_splat_layer_roundtrip | ok |
| ✓ | compiler::tests::many_repeated_small_subpaths_survive_compressed_roundtrip | ok |
| ✓ | shader_def_survives_binary_roundtrip_uncompressed | ok |
| ✓ | shader_def_survives_alongside_gradients_and_elements | ok |
| ✓ | shader_def_with_no_uniforms_roundtrips | ok |
| ✓ | tests::animations_match_accepts_f32_roundtrip_noise | ok |
| ✓ | tests::animations_match_catches_a_real_difference | ok |
| ✓ | tests::animations_match_catches_loop_mode_and_duration | ok |
| ✓ | tests::animations_match_catches_easing_difference | ok |
| ✓ | tests::extract_media_errors_on_unknown_id | ok |
| ✓ | tests::extract_media_writes_embedded_audio_with_detected_extension | ok |
| ✓ | tests::load_scene_bytes_rejects_invalid_input | ok |
| ✓ | tests::extract_media_honors_explicit_output_path | ok |
| ✓ | tests::load_scene_bytes_detects_binary | ok |
| ✓ | tests::load_scene_bytes_detects_dixscript_source | ok |
| ✓ | tests::audio_def_parses_via_the_same_media_source_machinery | ok |
| ✓ | tests::animations_default_to_empty_and_once | ok |
| ✓ | tests::animation_track_rejects_unknown_property | ok |
| ✓ | tests::animation_tracks_duration_and_loop_mode | ok |
| ✓ | tests::audio_def_with_embedded_data_decodes_base64 | ok |
| ✓ | tests::audio_def_with_embedded_data_that_does_not_sniff_as_audio_still_parses | ok |
| ✓ | tests::basic_rect_and_circle | ok |
| ✓ | tests::image_element_rejects_data_that_does_not_sniff_as_a_known_image_format | ok |
| ✓ | tests::image_element_with_source_ref_does_not_touch_base64_at_all | ok |
| ✓ | tests::image_element_requires_exactly_one_of_data_or_source_ref | ok |
| ✓ | tests::linear_gradient_def | ok |
| ✓ | tests::shader_def_defaults_entry_point_and_uniforms | ok |
| ✓ | tests::image_element_with_embedded_data_parses_and_decodes | ok |
| ✓ | tests::sdf_splat_and_layer | ok |
| ✓ | tests::shader_def_requires_fallback_color | ok |
| ✓ | tests::shader_def_with_uniforms | ok |
| ✓ | tests::shader_uniform_rejects_wrong_arity | ok |
| ✓ | tests::transform_object_form | ok |
| ✓ | tests::transform_string_form | ok |
| ✓ | blend::tests::divide_by_zero_saturates_to_white | ok |
| ✓ | blend::tests::overlay_matches_hardlight_with_swapped_args | ok |
| ✓ | blend::tests::multiply_with_black_backdrop_yields_black | ok |
| ✓ | blend::tests::normal_blend_opaque_source_replaces_backdrop | ok |
| ✓ | blend::tests::multiply_with_white_backdrop_keeps_source | ok |
| ✓ | blend::tests::screen_is_brighter_than_either_input | ok |
| ✓ | blend::tests::zero_alpha_source_leaves_backdrop_untouched | ok |
| ✓ | color::tests::opaque_over_anything_replaces_it | ok |
| ✓ | color::tests::straight_alpha_roundtrip | ok |
| ✓ | color::tests::transparent_over_anything_is_a_no_op | ok |
| ✓ | tile::tests::fill_sets_every_pixel | ok |
| ✓ | tile::tests::set_and_get_pixel_roundtrip | ok |
| ✓ | tile::tests::new_target_is_zeroed | ok |
| ✓ | tile::tests::out_of_bounds_set_is_ignored_not_panicking | ok |
| ✓ | tile::tests::tile_rows_covers_full_height_without_overlap | ok |
| ✓ | effects::tests::blur_with_zero_sigma_is_a_no_op | ok |
| ✓ | composite::tests::layer_at_full_opacity_normal_blend_matches_direct_draw | ok |
| ✓ | composite::tests::zero_opacity_layer_leaves_backdrop_untouched | ok |
| ✓ | geom::tests::identity_round_trips | ok |
| ✓ | geom::tests::rotate_then_invert_cancels_out | ok |
| ✓ | geom::tests::singular_matrix_has_no_inverse | ok |
| ✓ | geom::tests::translate_then_invert_cancels_out | ok |
| ✓ | image::tests::center_anchor_positions_the_image_around_its_own_midpoint | ok |
| ✓ | image::tests::embedded_png_renders_opaque_pixels_at_the_expected_position | ok |
| ✓ | image::tests::garbage_bytes_do_not_panic_and_paint_nothing | ok |
| ✓ | image::tests::missing_file_ref_does_not_panic_and_paints_nothing | ok |
| ✓ | image::tests::opacity_scales_the_composited_alpha | ok |
| ✓ | image::tests::transparent_source_pixels_leave_backdrop_untouched | ok |
| ✓ | pixel::tests::roundtrip_through_bytes | ok |
| ✓ | rasterizer::tests::arc_degenerate_same_point_does_not_panic | ok |
| ✓ | rasterizer::tests::arc_semicircle_builds_a_valid_path | ok |
| ✓ | rasterizer::tests::circle_path_bounds_match_diameter | ok |
| ✓ | rasterizer::tests::combine_with_no_local_transform_returns_parent_unchanged | ok |
| ✓ | rasterizer::tests::ellipse_path_is_well_formed | ok |
| ✓ | rasterizer::tests::rounded_rect_keeps_the_same_overall_extent | ok |
| ✓ | rasterizer::tests::sharp_rect_produces_a_path | ok |
| ✓ | sdf_raster::tests::antialias_is_opaque_well_inside_and_transparent_well_outside | ok |
| ✓ | sdf_raster::tests::bounds_cover_a_simple_circle | ok |
| ✓ | sdf_raster::tests::circle_inside_evaluates_negative | ok |
| ✓ | sdf_raster::tests::union_bounds_cover_both_children | ok |
| ✓ | splat_raster::tests::opaque_splat_paints_pixels_near_center | ok |
| ✓ | splat_raster::tests::splat_far_outside_canvas_is_a_no_op | ok |
| ✓ | effects::tests::blur_softens_a_hard_edge | ok |
| ✓ | splat_raster::tests::splat_fill_overrides_the_plain_color_field | ok |
| ✓ | effects::tests::drop_shadow_extends_alpha_beyond_the_original_shape | ok |
| ✓ | tests::equal_z_index_falls_back_to_plain_document_order | ok |
| ✓ | tests::z_index_flips_which_overlapping_layer_wins_the_pixel | ok |
| ✓ | effects::tests::inner_glow_stays_within_the_original_silhouette | ok |
| ✓ | rect_filled_with_shader_ref_paints_fallback_color | ok |
| ✓ | unresolvable_ref_paints_nothing_rather_than_panicking | ok |
| ✓ | sdf_stroke_and_fill_resolve_independently_against_different_defs | ok |
| ✓ | sdf_gradient_ref_still_works_after_the_defs_threading_fix | ok |
| ✓ | sdf_filled_with_shader_ref_paints_fallback_color | ok |
| ✓ | effects::tests::blur_params_matches_wgsl_std_layout_size | ok |
| ✓ | effects::tests::kernel_is_symmetric_and_peaks_at_center | ok |
| ✓ | effects::tests::kernel_never_empty_even_at_zero_radius | ok |
| ✓ | effects::tests::kernel_normalizes_to_unit_mass | ok |
| ✓ | effects::tests::kernel_respects_max_taps_cap | ok |
| ✓ | image::tests::image_params_matches_the_wgsl_struct_size | ok |
| ✓ | image::tests::top_left_image_no_transform_maps_to_the_four_canvas_corners_of_its_own_footprint | ok |
| ✓ | image::tests::quad_indices_form_two_triangles_covering_all_four_corners | ok |
| ✓ | layer::tests::blend_params_matches_the_wgsl_struct_size | ok |
| ✓ | effects::tests::kernel_has_no_nan_or_negative_weights | ok |
| ✓ | layer::tests::composite_params_matches_the_wgsl_struct_size | ok |
| ✓ | layer::tests::group_contains_layer_does_not_need_to_look_inside_a_found_layers_children | ok |
| ✓ | layer::tests::group_contains_layer_true_through_nested_group | ok |
| ✓ | layer::tests::group_contains_layer_false_with_no_layer_anywhere | ok |
| ✓ | layer::tests::group_contains_layer_true_for_direct_layer_child | ok |
| ✓ | layer::tests::paint_order_leaves_a_layer_free_group_inside_one_run | ok |
| ✓ | layer::tests::paint_order_recurses_into_a_group_split_for_its_own_local_ordering | ok |
| ✓ | layer::tests::paint_order_splits_a_layer_containing_group_out_of_its_run | ok |
| ✓ | layer::tests::paint_order_still_reorders_top_level_layers_by_z_index_alongside_a_group_split | ok |
| ✓ | layer::tests::wgsl_blend_port_matches_real_rust_reference | ok |
| ✓ | layer::tests::wgsl_formula_would_still_be_correct_for_normal_if_ever_routed_here | ok |
| ✓ | layer::tests::wgsl_full_composite_formula_matches_reference | ok |
| ✓ | sdf::tests::flatten_circle_produces_one_op | ok |
| ✓ | sdf::tests::collect_sdf_nodes_skips_layer_children | ok |
| ✓ | sdf::tests::collect_sdf_nodes_still_recurses_through_groups | ok |
| ✓ | sdf::tests::flatten_subtract_pushes_a_then_b_then_op | ok |
| ✓ | sdf::tests::mask_params_force_opaque_white_fill_and_disable_stroke | ok |
| ✓ | sdf::tests::node_bounding_quad_returns_four_vertices_and_six_indices_for_a_circle | ok |
| ✓ | shader::tests::pack_uniforms_matches_plasma_wgsl_layout_by_hand | ok |
| ✓ | sdf::tests::node_bounding_quad_returns_none_for_a_non_invertible_transform | ok |
| ✓ | shader::tests::pack_uniforms_vec3_then_scalar_does_not_over_pad | ok |
| ✓ | shader::tests::pack_uniforms_with_no_declared_uniforms_is_just_time | ok |
| ✓ | splat::tests::collect_splats_recurses_through_groups | ok |
| ✓ | splat::tests::collect_splats_skips_layer_children | ok |
| ✓ | splat::tests::effective_radius_grows_with_sigma | ok |
| ✓ | splat::tests::resolve_shader_def_finds_a_shader_ref_on_a_splats_fill | ok |
| ✓ | splat::tests::to_instance_resolves_a_gradient_fill_instead_of_the_plain_color_field | ok |
| ✓ | splat::tests::to_instance_bakes_opacity_into_alpha | ok |
| ✓ | sdf::tests::flatten_smooth_union_reverses_child_push_order | ok |
| ✓ | tests::layer_shader_fill_executes_for_a_vector_shape_inside_a_layer_if_a_gpu_adapter_is_available | ok |
| ✓ | tests::layer_shader_fill_executes_for_a_splat_inside_a_layer_if_a_gpu_adapter_is_available | ok |
| ✓ | tests::layer_blur_effect_bleeds_color_across_a_hard_edge_if_a_gpu_adapter_is_available | ok |
| ✓ | tests::darken_blend_mode_at_half_opacity_only_partially_darkens_if_a_gpu_adapter_is_available | ok |
| ✓ | tests::multiply_blend_mode_actually_multiplies_if_a_gpu_adapter_is_available | ok |
| ✓ | tests::renders_a_filled_rect_if_a_gpu_adapter_is_available | ok |
| ✓ | tests::renders_a_layer_at_half_opacity_if_a_gpu_adapter_is_available | ok |
| ✓ | vector::shader_routing_tests::flat_filled_rect_is_unaffected_by_shader_routing | ok |
| ✓ | vector::shader_routing_tests::gradient_ref_is_not_mistaken_for_a_shader_ref | ok |
| ✓ | vector::shader_routing_tests::plain_tessellate_scene_still_flat_fills_shader_refs_no_collector_available | ok |
| ✓ | vector::shader_routing_tests::shader_filled_rect_is_routed_to_the_shader_collector_not_the_flat_batch | ok |
| ✓ | vector::shader_routing_tests::tessellate_elements_with_shaders_diverts_a_shader_ref_into_the_collector | ok |
| ✓ | tests::renders_a_splat_if_a_gpu_adapter_is_available | ok |
| ✓ | tests::layer_shader_fill_executes_for_an_sdf_node_inside_a_layer_if_a_gpu_adapter_is_available | ok |
| ✓ | tests::renders_an_sdf_circle_if_a_gpu_adapter_is_available | ok |
| ✓ | tests::embedded_image_renders_as_data_uri_with_correct_mime_and_anchor_offset | ok |
| ✓ | tests::file_ref_image_renders_href_as_plain_path_not_a_data_uri | ok |
| ✓ | tests::layer_emits_blend_mode_css_and_filter | ok |
| ✓ | tests::polygon_and_polyline_share_closed_flag_dispatch | ok |
| ✓ | tests::sdf_falls_back_to_comment | ok |
| ✓ | tests::renders_basic_shapes_with_expected_attrs | ok |
| ✓ | tests::renders_gradient_defs | ok |
| ✓ | tests::shader_def_emits_a_documented_comment_not_a_paint_server | ok |
| ✓ | tests::shape_referencing_a_shader_def_still_gets_its_url_fill_attribute | ok |
| ✓ | tests::splat_generates_radial_gradient_fallback | ok |
| ✓ | tests::splat_fill_overrides_color_in_the_svg_fallback_gradient | ok |
| ✓ | tests::splat_fill_resolves_correctly_even_nested_inside_a_group | ok |
| ✓ | tests::z_index_reorders_emitted_g_elements_not_just_data | ok |
| ✓ | field::tests::composed_field_matches_free_function_call | ok |
| ✓ | field::tests::smooth_union_struct_softens_the_seam_between_separate_shapes | ok |
| ✓ | field::tests::subtract_struct_carves_a_hole | ok |
| ✓ | ops::tests::intersect_requires_both | ok |
| ✓ | ops::tests::smooth_subtract_zero_k_matches_hard_subtract | ok |
| ✓ | ops::tests::smooth_union_blends_below_hard_minimum | ok |
| ✓ | ops::tests::smooth_union_zero_k_matches_hard_union | ok |
| ✓ | ops::tests::subtract_excludes_b_region | ok |
| ✓ | shapes::tests::arc_within_range_behaves_like_ring | ok |
| ✓ | ops::tests::union_picks_closer_surface | ok |
| ✓ | shapes::tests::arc_outside_range_distances_to_nearest_cap | ok |
| ✓ | shapes::tests::circle_signs | ok |
| ✓ | shapes::tests::ring_inside_band_is_negative | ok |
| ✓ | shapes::tests::rounded_box_zero_radius_matches_sharp_box | ok |
| ✓ | shapes::tests::segment_distance_at_midpoint_is_zero | ok |
| ✓ | compositor::tests::single_full_alpha_contribution_replaces_background | ok |
| ✓ | gaussian::tests::effective_radius_matches_f64_reference | ok |
| ✓ | gaussian::tests::matches_f64_reference_at_center | ok |
| ✓ | gaussian::tests::matches_f64_reference_off_center | ok |
| ✓ | gaussian::tests::opacity_scales_peak_value | ok |
| ✓ | input::tests::dropped_file_ignores_other_events | ok |
| ✓ | input::tests::dropped_file_extracts_the_path | ok |
| ✓ | playback::tests::frame_interval_is_roughly_60hz | ok |
| ✓ | playback::tests::loop_never_settles | ok |
| ✓ | playback::tests::once_stops_at_or_past_duration | ok |
| ✓ | playback::tests::once_keeps_playing_before_duration | ok |
| ✓ | playback::tests::once_with_zero_duration_never_plays | ok |
| ✓ | playback::tests::ping_pong_never_settles | ok |
| ✓ | renderer::tests::load_scene_bytes_detects_binary | ok |
| ✓ | renderer::tests::load_scene_bytes_rejects_invalid_input | ok |
| ✓ | renderer::tests::load_scene_bytes_detects_dixscript_source | ok |
No test data.
| ✓ | polygon_decodes_as_closed_polyline_not_as_polygon_variant | ok |
| ✓ | roundtrip_audio_def_embedded | ok |
| ✓ | roundtrip_animation_timeline | ok |
| ✓ | roundtrip_audio_def_file_ref | ok |
| ✓ | roundtrip_circle | ok |
| ✓ | roundtrip_ellipse | ok |
| ✓ | roundtrip_conic_gradient_fields | ok |
| ✓ | roundtrip_image_embedded | ok |
| ✓ | roundtrip_line | ok |
| ✓ | roundtrip_group_with_transform | ok |
| ✓ | roundtrip_layer_blend_and_clip | ok |
| ✓ | roundtrip_linear_gradient | ok |
| ✓ | roundtrip_nested_groups | ok |
| ✓ | roundtrip_opacity_zero_element | ok |
| ✓ | roundtrip_path_arc | ok |
| ✓ | roundtrip_parametric_circles | ok |
| ✓ | roundtrip_path_cubic_bezier | ok |
| ✓ | roundtrip_path_triangle | ok |
| ✓ | roundtrip_polygon | ok |
| ✓ | roundtrip_polyline | ok |
| ✓ | roundtrip_rect_rounded | ok |
| ✓ | roundtrip_quickfunc_badge | ok |
| ✓ | roundtrip_radial_gradient | ok |
| ✓ | roundtrip_sdf_subtract | ok |
| ✓ | roundtrip_sdf_smooth_union_variadic | ok |
| ✓ | roundtrip_shader_def_fields | ok |
| ✓ | roundtrip_splat | ok |
| ✓ | roundtrip_stroke_dasharray | ok |
| ✓ | roundtrip_text | ok |
| ✓ | roundtrip_use_element | ok |
| ✓ | roundtrip_many_elements_compression_ratio | ok |
| ✓ | tests::element_with_no_matching_track_is_untouched | ok |
| ✓ | tests::animated_translate_adds_onto_existing_static_translate | ok |
| ✓ | tests::group_containing_sdf_and_splat_children_animate_independently_of_the_group | ok |
| ✓ | tests::identity_matrix_check_sanity | ok |
| ✓ | tests::layer_z_index_field_is_overridden_not_composed | ok |
| ✓ | tests::image_opacity_and_transform_animate_like_other_elements | ok |
| ✓ | tests::layer_z_index_is_untouched_without_a_track | ok |
| ✓ | tests::layer_opacity_field_is_multiplied_directly | ok |
| ✓ | tests::loop_mode_wraps_time_before_evaluating_tracks | ok |
| ✓ | tests::mixed_scene_animates_sdf_and_splat_independently | ok |
| ✓ | tests::opacity_track_multiplies_existing_style_opacity | ok |
| ✓ | tests::rotate_delta_pivots_the_whole_statically_positioned_element_around_the_parent_origin | ok |
| ✓ | tests::scene_with_no_tracks_is_returned_unchanged | ok |
| ✓ | tests::sdf_transform_animates_like_other_elements | ok |
| ✓ | tests::splat_fields_are_updated_directly_since_it_has_no_transform | ok |
| ✓ | tests::tracks_recurse_into_group_children | ok |
| ✓ | tests::translate_track_composes_onto_absent_static_transform | ok |
| ✓ | animation::tests::animated_property_byte_roundtrip | ok |
| ✓ | animation::tests::ease_in_out_is_continuous_at_the_midpoint | ok |
| ✓ | animation::tests::easing_boundaries_are_exact_for_every_curve | ok |
| ✓ | animation::tests::easing_curves_are_monotonic_increasing | ok |
| ✓ | animation::tests::evaluate_applies_the_destination_keyframes_easing | ok |
| ✓ | animation::tests::easing_byte_roundtrip | ok |
| ✓ | animation::tests::evaluate_exact_keyframe_time_returns_its_exact_value | ok |
| ✓ | animation::tests::evaluate_empty_track_returns_none | ok |
| ✓ | animation::tests::evaluate_holds_before_first_and_after_last_keyframe | ok |
| ✓ | animation::tests::evaluate_ignores_out_of_order_keyframe_input | ok |
| ✓ | animation::tests::evaluate_linear_midpoint_is_the_average | ok |
| ✓ | animation::tests::evaluate_single_keyframe_is_constant_everywhere | ok |
| ✓ | animation::tests::loop_mode_byte_roundtrip | ok |
| ✓ | animation::tests::loop_wraps_back_to_zero_each_cycle | ok |
| ✓ | animation::tests::max_time_finds_the_latest_keyframe | ok |
| ✓ | animation::tests::once_clamps_at_the_end_instead_of_wrapping | ok |
| ✓ | animation::tests::scale_and_opacity_identity_is_one_everything_else_is_zero | ok |
| ✓ | canvas::tests::explicit_duration_with_no_tracks_is_not_animated | ok |
| ✓ | animation::tests::ping_pong_alternates_forward_and_backward_each_cycle | ok |
| ✓ | animation::tests::z_index_parse_and_dixscript_str_roundtrip | ok |
| ✓ | animation::tests::zero_duration_always_resolves_to_zero | ok |
| ✓ | canvas::tests::new_scene_has_no_animation_by_default | ok |
| ✓ | canvas::tests::tracks_with_explicit_duration_are_animated | ok |
| ✓ | color::tests::bytes | ok |
| ✓ | canvas::tests::tracks_without_explicit_duration_infer_it_from_keyframes | ok |
| ✓ | color::tests::hex3 | ok |
| ✓ | color::tests::url_preserved | ok |
| ✓ | color::tests::hex6 | ok |
| ✓ | color::tests::rgba_f | ok |
| ✓ | gradient::tests::shader_def_id_and_svg_fallback | ok |
| ✓ | gradient::tests::stop_roundtrip | ok |
| ✓ | layer::layer_reorder_tests::equal_z_index_keeps_original_document_order | ok |
| ✓ | layer::layer_reorder_tests::non_layer_elements_keep_their_exact_slots | ok |
| ✓ | layer::layer_reorder_tests::zero_or_one_layer_is_returned_unchanged | ok |
| ✓ | media::tests::anchor_byte_roundtrip | ok |
| ✓ | media::tests::anchor_dixscript_str_roundtrip | ok |
| ✓ | media::tests::center_anchor_offsets_by_half_extent | ok |
| ✓ | media::tests::bottom_right_anchor_offsets_by_full_extent | ok |
| ✓ | media::tests::garbage_sniffs_as_none | ok |
| ✓ | media::tests::bare_mp3_frame_sync_sniffs_as_none | ok |
| ✓ | media::tests::id3_tagged_mp3_sniffs_as_mp3 | ok |
| ✓ | media::tests::jpeg_signature_sniffs_as_jpeg | ok |
| ✓ | media::tests::ogg_signature_sniffs_as_ogg | ok |
| ✓ | media::tests::short_input_does_not_panic | ok |
| ✓ | media::tests::png_signature_sniffs_as_png | ok |
| ✓ | media::tests::top_left_anchor_is_the_identity | ok |
| ✓ | media::tests::unrecognized_anchor_string_falls_back_to_top_left | ok |
| ✓ | media::tests::wav_signature_sniffs_as_wav | ok |
| ✓ | path::tests::arc_flags | ok |
| ✓ | path::tests::relative_preserved | ok |
| ✓ | path::tests::d_string_roundtrip | ok |
| ✓ | path::tests::triangle | ok |
| ✓ | primitives::tests::bbox_expand | ok |
| ✓ | layer::layer_reorder_tests::two_layers_reorder_by_z_index_regardless_of_document_order | ok |
| ✓ | primitives::tests::distance | ok |
| ✓ | primitives::tests::viewbox_rt | ok |
| ✓ | sdf::tests::sdf_tree_constructs | ok |
| ✓ | sdf::tests::smooth_union_preserves_k | ok |
| ✓ | sdf::tests::subtract_chaining | ok |
| ✓ | primitives::tests::fmt_strips | ok |
| ✓ | splat::tests::center_is_one | ok |
| ✓ | splat::tests::falls_off_at_sigma | ok |
| ✓ | splat::tests::effective_radius_range | ok |
| ✓ | style::tests::fillrule_rt | ok |
| ✓ | style::tests::fw_normal_omitted | ok |
| ✓ | style::tests::flags_fill_only | ok |
| ✓ | style::tests::ta_start_omitted | ok |
| ✓ | style::tests::linecap_all | ok |
| ✓ | style::tests::opacity_1_omitted | ok |
| ✓ | style::tests::opacity_half_present | ok |
| ✓ | transform::tests::rotate_90 | ok |
| ✓ | transform::tests::matrix_bytes | ok |
| ✓ | transform::tests::identity_concat | ok |
| ✓ | transform::tests::parse_translate | ok |
| ✓ | transform::tests::svg_attr_rt | ok |
| ✓ | compiler::tests::compile_elem_count_in_header | ok |
| ✓ | compiler::tests::compile_header_dimensions | ok |
| ✓ | compiler::tests::compile_produces_valid_header_magic | ok |
| ✓ | compiler::tests::compile_compressed_sets_flag | ok |
| ✓ | compiler::tests::compile_uncompressed_no_compress_flag | ok |
| ✓ | compiler::tests::animation_tracks_survive_roundtrip | ok |
| ✓ | compiler::tests::explicit_duration_and_loop_mode_survive_with_no_tracks | ok |
| ✓ | compiler::tests::audio_def_roundtrips | ok |
| ✓ | compiler::tests::path_d_raw_survives_roundtrip_byte_for_byte | ok |
| ✓ | compiler::tests::image_element_with_embedded_source_roundtrips | ok |
| ✓ | compiler::tests::rect_ry_none_does_not_inherit_rx | ok |
| ✓ | compiler::tests::scene_without_animation_is_unaffected | ok |
| ✓ | compiler::tests::splat_fill_roundtrips_both_present_and_absent | ok |
| ✓ | decoder::tests::font_weight_none_roundtrips_as_none | ok |
| ✓ | decoder::tests::paint_color_roundtrip | ok |
| ✓ | compiler::tests::sdf_splat_layer_roundtrip | ok |
| ✓ | decoder::tests::paint_currentcolor_rt | ok |
| ✓ | decoder::tests::paint_none_roundtrip | ok |
| ✓ | decoder::tests::paint_ref_roundtrip | ok |
| ✓ | decoder::tests::string_pool_roundtrip | ok |
| ✓ | decoder::tests::style_roundtrip | ok |
| ✓ | decoder::tests::text_anchor_none_roundtrips_as_none | ok |
| ✓ | compiler::tests::image_element_with_file_ref_source_roundtrips | ok |
| ✓ | decoder::tests::transform_translate_roundtrip | ok |
| ✓ | decoder::tests::transform_rotate_with_center_roundtrip | ok |
| ✓ | effect_codec::tests::outer_glow_roundtrip | ok |
| ✓ | encoder::tests::intern_string_deduplicates | ok |
| ✓ | encoder::tests::write_paint_color | ok |
| ✓ | encoder::tests::write_paint_none_is_single_byte | ok |
| ✓ | encoder::tests::write_u16_le | ok |
| ✓ | header::tests::animations_flag_roundtrips | ok |
| ✓ | header::tests::bad_magic_rejected | ok |
| ✓ | header::tests::bad_version_rejected | ok |
| ✓ | header::tests::serialize_parse_roundtrip | ok |
| ✓ | path_codec::tests::arc_roundtrip | ok |
| ✓ | path_codec::tests::binary_roundtrip | ok |
| ✓ | sdf_codec::tests::circle_roundtrip | ok |
| ✓ | sdf_codec::tests::nested_subtract_roundtrip | ok |
| ✓ | effect_codec::tests::blur_roundtrip | ok |
| ✓ | sdf_codec::tests::smooth_union_roundtrip | ok |
| ✓ | effect_codec::tests::drop_shadow_roundtrip | ok |
| ✓ | compiler::tests::many_repeated_small_subpaths_survive_compressed_roundtrip | ok |
| ✓ | shader_def_survives_binary_roundtrip_uncompressed | ok |
| ✓ | shader_def_survives_alongside_gradients_and_elements | ok |
| ✓ | shader_def_with_no_uniforms_roundtrips | ok |
| ✓ | tests::animations_match_accepts_f32_roundtrip_noise | ok |
| ✓ | tests::animations_match_catches_a_real_difference | ok |
| ✓ | tests::animations_match_catches_easing_difference | ok |
| ✓ | tests::animations_match_catches_loop_mode_and_duration | ok |
| ✓ | tests::extract_media_errors_on_unknown_id | ok |
| ✓ | tests::extract_media_writes_embedded_audio_with_detected_extension | ok |
| ✓ | tests::extract_media_honors_explicit_output_path | ok |
| ✓ | tests::load_scene_bytes_detects_binary | ok |
| ✓ | tests::load_scene_bytes_rejects_invalid_input | ok |
| ✓ | tests::load_scene_bytes_detects_dixscript_source | ok |
| ✓ | tests::animation_track_rejects_unknown_property | ok |
| ✓ | tests::animation_tracks_duration_and_loop_mode | ok |
| ✓ | tests::animations_default_to_empty_and_once | ok |
| ✓ | tests::audio_def_parses_via_the_same_media_source_machinery | ok |
| ✓ | tests::audio_def_with_embedded_data_decodes_base64 | ok |
| ✓ | tests::audio_def_with_embedded_data_that_does_not_sniff_as_audio_still_parses | ok |
| ✓ | tests::image_element_requires_exactly_one_of_data_or_source_ref | ok |
| ✓ | tests::image_element_rejects_data_that_does_not_sniff_as_a_known_image_format | ok |
| ✓ | tests::basic_rect_and_circle | ok |
| ✓ | tests::image_element_with_embedded_data_parses_and_decodes | ok |
| ✓ | tests::image_element_with_source_ref_does_not_touch_base64_at_all | ok |
| ✓ | tests::shader_def_defaults_entry_point_and_uniforms | ok |
| ✓ | tests::sdf_splat_and_layer | ok |
| ✓ | tests::shader_def_requires_fallback_color | ok |
| ✓ | tests::linear_gradient_def | ok |
| ✓ | tests::transform_object_form | ok |
| ✓ | tests::shader_uniform_rejects_wrong_arity | ok |
| ✓ | tests::shader_def_with_uniforms | ok |
| ✓ | tests::transform_string_form | ok |
| ✓ | blend::tests::divide_by_zero_saturates_to_white | ok |
| ✓ | blend::tests::multiply_with_black_backdrop_yields_black | ok |
| ✓ | blend::tests::multiply_with_white_backdrop_keeps_source | ok |
| ✓ | blend::tests::normal_blend_opaque_source_replaces_backdrop | ok |
| ✓ | blend::tests::overlay_matches_hardlight_with_swapped_args | ok |
| ✓ | blend::tests::screen_is_brighter_than_either_input | ok |
| ✓ | blend::tests::zero_alpha_source_leaves_backdrop_untouched | ok |
| ✓ | color::tests::opaque_over_anything_replaces_it | ok |
| ✓ | color::tests::straight_alpha_roundtrip | ok |
| ✓ | color::tests::transparent_over_anything_is_a_no_op | ok |
| ✓ | tile::tests::fill_sets_every_pixel | ok |
| ✓ | tile::tests::new_target_is_zeroed | ok |
| ✓ | tile::tests::set_and_get_pixel_roundtrip | ok |
| ✓ | tile::tests::tile_rows_covers_full_height_without_overlap | ok |
| ✓ | tile::tests::out_of_bounds_set_is_ignored_not_panicking | ok |
| ✓ | effects::tests::blur_with_zero_sigma_is_a_no_op | ok |
| ✓ | composite::tests::layer_at_full_opacity_normal_blend_matches_direct_draw | ok |
| ✓ | composite::tests::zero_opacity_layer_leaves_backdrop_untouched | ok |
| ✓ | effects::tests::blur_softens_a_hard_edge | ok |
| ✓ | geom::tests::identity_round_trips | ok |
| ✓ | geom::tests::rotate_then_invert_cancels_out | ok |
| ✓ | geom::tests::singular_matrix_has_no_inverse | ok |
| ✓ | geom::tests::translate_then_invert_cancels_out | ok |
| ✓ | effects::tests::inner_glow_stays_within_the_original_silhouette | ok |
| ✓ | image::tests::embedded_png_renders_opaque_pixels_at_the_expected_position | ok |
| ✓ | image::tests::center_anchor_positions_the_image_around_its_own_midpoint | ok |
| ✓ | effects::tests::drop_shadow_extends_alpha_beyond_the_original_shape | ok |
| ✓ | image::tests::garbage_bytes_do_not_panic_and_paint_nothing | ok |
| ✓ | image::tests::missing_file_ref_does_not_panic_and_paints_nothing | ok |
| ✓ | image::tests::transparent_source_pixels_leave_backdrop_untouched | ok |
| ✓ | image::tests::opacity_scales_the_composited_alpha | ok |
| ✓ | pixel::tests::roundtrip_through_bytes | ok |
| ✓ | rasterizer::tests::arc_degenerate_same_point_does_not_panic | ok |
| ✓ | rasterizer::tests::arc_semicircle_builds_a_valid_path | ok |
| ✓ | rasterizer::tests::rounded_rect_keeps_the_same_overall_extent | ok |
| ✓ | rasterizer::tests::circle_path_bounds_match_diameter | ok |
| ✓ | rasterizer::tests::combine_with_no_local_transform_returns_parent_unchanged | ok |
| ✓ | rasterizer::tests::ellipse_path_is_well_formed | ok |
| ✓ | rasterizer::tests::sharp_rect_produces_a_path | ok |
| ✓ | sdf_raster::tests::antialias_is_opaque_well_inside_and_transparent_well_outside | ok |
| ✓ | sdf_raster::tests::bounds_cover_a_simple_circle | ok |
| ✓ | sdf_raster::tests::circle_inside_evaluates_negative | ok |
| ✓ | sdf_raster::tests::union_bounds_cover_both_children | ok |
| ✓ | splat_raster::tests::splat_far_outside_canvas_is_a_no_op | ok |
| ✓ | splat_raster::tests::splat_fill_overrides_the_plain_color_field | ok |
| ✓ | tests::z_index_flips_which_overlapping_layer_wins_the_pixel | ok |
| ✓ | tests::equal_z_index_falls_back_to_plain_document_order | ok |
| ✓ | splat_raster::tests::opaque_splat_paints_pixels_near_center | ok |
| ✓ | rect_filled_with_shader_ref_paints_fallback_color | ok |
| ✓ | unresolvable_ref_paints_nothing_rather_than_panicking | ok |
| ✓ | sdf_gradient_ref_still_works_after_the_defs_threading_fix | ok |
| ✓ | sdf_stroke_and_fill_resolve_independently_against_different_defs | ok |
| ✓ | sdf_filled_with_shader_ref_paints_fallback_color | ok |
| ✓ | effects::tests::blur_params_matches_wgsl_std_layout_size | ok |
| ✓ | effects::tests::kernel_has_no_nan_or_negative_weights | ok |
| ✓ | effects::tests::kernel_is_symmetric_and_peaks_at_center | ok |
| ✓ | effects::tests::kernel_never_empty_even_at_zero_radius | ok |
| ✓ | image::tests::quad_indices_form_two_triangles_covering_all_four_corners | ok |
| ✓ | effects::tests::kernel_normalizes_to_unit_mass | ok |
| ✓ | effects::tests::kernel_respects_max_taps_cap | ok |
| ✓ | image::tests::image_params_matches_the_wgsl_struct_size | ok |
| ✓ | image::tests::top_left_image_no_transform_maps_to_the_four_canvas_corners_of_its_own_footprint | ok |
| ✓ | layer::tests::blend_params_matches_the_wgsl_struct_size | ok |
| ✓ | layer::tests::composite_params_matches_the_wgsl_struct_size | ok |
| ✓ | layer::tests::group_contains_layer_does_not_need_to_look_inside_a_found_layers_children | ok |
| ✓ | layer::tests::group_contains_layer_true_for_direct_layer_child | ok |
| ✓ | layer::tests::paint_order_leaves_a_layer_free_group_inside_one_run | ok |
| ✓ | layer::tests::paint_order_recurses_into_a_group_split_for_its_own_local_ordering | ok |
| ✓ | layer::tests::group_contains_layer_false_with_no_layer_anywhere | ok |
| ✓ | layer::tests::paint_order_splits_a_layer_containing_group_out_of_its_run | ok |
| ✓ | layer::tests::group_contains_layer_true_through_nested_group | ok |
| ✓ | layer::tests::paint_order_still_reorders_top_level_layers_by_z_index_alongside_a_group_split | ok |
| ✓ | layer::tests::wgsl_blend_port_matches_real_rust_reference | ok |
| ✓ | sdf::tests::collect_sdf_nodes_skips_layer_children | ok |
| ✓ | layer::tests::wgsl_formula_would_still_be_correct_for_normal_if_ever_routed_here | ok |
| ✓ | layer::tests::wgsl_full_composite_formula_matches_reference | ok |
| ✓ | sdf::tests::collect_sdf_nodes_still_recurses_through_groups | ok |
| ✓ | sdf::tests::flatten_circle_produces_one_op | ok |
| ✓ | sdf::tests::mask_params_force_opaque_white_fill_and_disable_stroke | ok |
| ✓ | sdf::tests::flatten_smooth_union_reverses_child_push_order | ok |
| ✓ | sdf::tests::flatten_subtract_pushes_a_then_b_then_op | ok |
| ✓ | sdf::tests::node_bounding_quad_returns_four_vertices_and_six_indices_for_a_circle | ok |
| ✓ | shader::tests::pack_uniforms_vec3_then_scalar_does_not_over_pad | ok |
| ✓ | sdf::tests::node_bounding_quad_returns_none_for_a_non_invertible_transform | ok |
| ✓ | shader::tests::pack_uniforms_matches_plasma_wgsl_layout_by_hand | ok |
| ✓ | splat::tests::effective_radius_grows_with_sigma | ok |
| ✓ | shader::tests::pack_uniforms_with_no_declared_uniforms_is_just_time | ok |
| ✓ | splat::tests::collect_splats_recurses_through_groups | ok |
| ✓ | splat::tests::collect_splats_skips_layer_children | ok |
| ✓ | splat::tests::resolve_shader_def_finds_a_shader_ref_on_a_splats_fill | ok |
| ✓ | splat::tests::to_instance_bakes_opacity_into_alpha | ok |
| ✓ | splat::tests::to_instance_resolves_a_gradient_fill_instead_of_the_plain_color_field | ok |
| ✓ | tests::layer_shader_fill_executes_for_a_vector_shape_inside_a_layer_if_a_gpu_adapter_is_available | ok |
| ✓ | tests::layer_blur_effect_bleeds_color_across_a_hard_edge_if_a_gpu_adapter_is_available | ok |
| ✓ | tests::layer_shader_fill_executes_for_a_splat_inside_a_layer_if_a_gpu_adapter_is_available | ok |
| ✓ | tests::darken_blend_mode_at_half_opacity_only_partially_darkens_if_a_gpu_adapter_is_available | ok |
| ✓ | tests::multiply_blend_mode_actually_multiplies_if_a_gpu_adapter_is_available | ok |
| ✓ | tests::renders_a_filled_rect_if_a_gpu_adapter_is_available | ok |
| ✓ | tests::renders_a_layer_at_half_opacity_if_a_gpu_adapter_is_available | ok |
| ✓ | vector::shader_routing_tests::flat_filled_rect_is_unaffected_by_shader_routing | ok |
| ✓ | vector::shader_routing_tests::gradient_ref_is_not_mistaken_for_a_shader_ref | ok |
| ✓ | vector::shader_routing_tests::plain_tessellate_scene_still_flat_fills_shader_refs_no_collector_available | ok |
| ✓ | vector::shader_routing_tests::shader_filled_rect_is_routed_to_the_shader_collector_not_the_flat_batch | ok |
| ✓ | vector::shader_routing_tests::tessellate_elements_with_shaders_diverts_a_shader_ref_into_the_collector | ok |
| ✓ | tests::renders_a_splat_if_a_gpu_adapter_is_available | ok |
| ✓ | tests::layer_shader_fill_executes_for_an_sdf_node_inside_a_layer_if_a_gpu_adapter_is_available | ok |
| ✓ | tests::renders_an_sdf_circle_if_a_gpu_adapter_is_available | ok |
| ✓ | tests::file_ref_image_renders_href_as_plain_path_not_a_data_uri | ok |
| ✓ | tests::embedded_image_renders_as_data_uri_with_correct_mime_and_anchor_offset | ok |
| ✓ | tests::layer_emits_blend_mode_css_and_filter | ok |
| ✓ | tests::renders_basic_shapes_with_expected_attrs | ok |
| ✓ | tests::renders_gradient_defs | ok |
| ✓ | tests::sdf_falls_back_to_comment | ok |
| ✓ | tests::polygon_and_polyline_share_closed_flag_dispatch | ok |
| ✓ | tests::shader_def_emits_a_documented_comment_not_a_paint_server | ok |
| ✓ | tests::shape_referencing_a_shader_def_still_gets_its_url_fill_attribute | ok |
| ✓ | tests::splat_fill_overrides_color_in_the_svg_fallback_gradient | ok |
| ✓ | tests::splat_fill_resolves_correctly_even_nested_inside_a_group | ok |
| ✓ | tests::splat_generates_radial_gradient_fallback | ok |
| ✓ | tests::z_index_reorders_emitted_g_elements_not_just_data | ok |
| ✓ | field::tests::composed_field_matches_free_function_call | ok |
| ✓ | field::tests::smooth_union_struct_softens_the_seam_between_separate_shapes | ok |
| ✓ | field::tests::subtract_struct_carves_a_hole | ok |
| ✓ | ops::tests::intersect_requires_both | ok |
| ✓ | ops::tests::smooth_subtract_zero_k_matches_hard_subtract | ok |
| ✓ | ops::tests::subtract_excludes_b_region | ok |
| ✓ | ops::tests::smooth_union_blends_below_hard_minimum | ok |
| ✓ | ops::tests::smooth_union_zero_k_matches_hard_union | ok |
| ✓ | ops::tests::union_picks_closer_surface | ok |
| ✓ | shapes::tests::arc_outside_range_distances_to_nearest_cap | ok |
| ✓ | shapes::tests::arc_within_range_behaves_like_ring | ok |
| ✓ | shapes::tests::circle_signs | ok |
| ✓ | shapes::tests::ring_inside_band_is_negative | ok |
| ✓ | shapes::tests::rounded_box_zero_radius_matches_sharp_box | ok |
| ✓ | shapes::tests::segment_distance_at_midpoint_is_zero | ok |
| ✓ | compositor::tests::single_full_alpha_contribution_replaces_background | ok |
| ✓ | gaussian::tests::matches_f64_reference_at_center | ok |
| ✓ | gaussian::tests::effective_radius_matches_f64_reference | ok |
| ✓ | gaussian::tests::matches_f64_reference_off_center | ok |
| ✓ | gaussian::tests::opacity_scales_peak_value | ok |
| ✓ | input::tests::dropped_file_extracts_the_path | ok |
| ✓ | input::tests::dropped_file_ignores_other_events | ok |
| ✓ | playback::tests::loop_never_settles | ok |
| ✓ | playback::tests::frame_interval_is_roughly_60hz | ok |
| ✓ | playback::tests::once_keeps_playing_before_duration | ok |
| ✓ | playback::tests::once_with_zero_duration_never_plays | ok |
| ✓ | playback::tests::ping_pong_never_settles | ok |
| ✓ | playback::tests::once_stops_at_or_past_duration | ok |
| ✓ | renderer::tests::load_scene_bytes_rejects_invalid_input | ok |
| ✓ | renderer::tests::load_scene_bytes_detects_dixscript_source | ok |
| ✓ | renderer::tests::load_scene_bytes_detects_binary | ok |
Three panes per example: the original
.msx
DixScript source, the generated SVG export markup, and the actual MSX render —
a PNG produced by msx rasterize
(msx-render-cpu), not a browser reinterpreting the SVG next to it. A native pixel
buffer is MSX's primary output — SVG is one optional export target, not the source
of truth for what a file looks like. QuickFuncs are resolved at compile time —
the binary contains only the flat scene graph.
@CONFIG( version -> "1.0.0" )
@QUICKFUNCS(
~shape<object>(type, x, y, w, h, color) {
return {
type = type
x = x y = y width = w height = h
style = { fill = color, stroke = #ffffff, stroke_width = 1.5, opacity = 1.0 }
}
}
)
@DATA(
scene = { width = 600, height = 400, background = #1a1a2e }
elements::
shape("rect", 20, 20, 160, 120, #e94560)
shape("rect", 200, 20, 160, 120, #4a9eff)
shape("rect", 400, 20, 160, 120, #22c55e)
shape("rect", 20, 180, 160, 120, #f5a623)
shape("rect", 200, 180, 160, 120, #a78bfa)
shape("rect", 400, 180, 160, 120, #533483)
{ type = "circle", cx = 300, cy = 300, r = 60,
style = { fill = #0f3460, stroke = #4a9eff, stroke_width = 3.0, opacity = 0.9 } }
{ type = "text", x = 300, y = 390, content = "MSX Basic Shapes",
style = { fill = #ffffff, font_size = 14, text_anchor = "middle",
stroke = "none", stroke_width = 0, opacity = 1.0 } }
)
<svg xmlns="http://www.w3.org/2000/svg" width="600" height="400" viewBox="0 0 600 400"><rect width="600" height="400" fill="#1a1a2e"/><rect x="20" y="20" width="160" height="120" fill="#e94560" stroke="#ffffff" stroke-width="1.5"/><rect x="200" y="20" width="160" height="120" fill="#4a9eff" stroke="#ffffff" stroke-width="1.5"/><rect x="400" y="20" width="160" height="120" fill="#22c55e" stroke="#ffffff" stroke-width="1.5"/><rect x="20" y="180" width="160" height="120" fill="#f5a623" stroke="#ffffff" stroke-width="1.5"/><rect x="200" y="180" width="160" height="120" fill="#a78bfa" stroke="#ffffff" stroke-width="1.5"/><rect x="400" y="180" width="160" height="120" fill="#533483" stroke="#ffffff" stroke-width="1.5"/><circle cx="300" cy="300" r="60" fill="#0f3460" stroke="#4a9eff" stroke-width="3" opacity="0.9"/><text x="300" y="390" fill="#ffffff" stroke="none" stroke-width="0" font-size="14" text-anchor="middle">MSX Basic Shapes</text></svg>
@CONFIG( version -> "1.0.0" )
@DATA(
scene = { width = 600, height = 400, background = #ffffff }
defs::
{ type = "linear_gradient", id = "sunset",
x1 = 0.0, y1 = 0.0, x2 = 1.0, y2 = 0.0,
stops = [
{ offset = 0.0, color = #f7971e, opacity = 1.0 },
{ offset = 1.0, color = #ffd200, opacity = 1.0 }
] }
{ type = "linear_gradient", id = "ocean",
x1 = 0.0, y1 = 0.0, x2 = 0.0, y2 = 1.0,
stops = [
{ offset = 0.0, color = #2196f3, opacity = 1.0 },
{ offset = 1.0, color = #0d47a1, opacity = 1.0 }
] }
{ type = "radial_gradient", id = "glow",
cx = 0.5, cy = 0.5, r = 0.5,
stops = [
{ offset = 0.0, color = #4facfe, opacity = 1.0 },
{ offset = 1.0, color = #00f2fe, opacity = 0.0 }
] }
elements::
{ type = "rect", x = 30, y = 30, width = 250, height = 80,
style = { fill = "url(#sunset)", stroke = "none", stroke_width = 0, opacity = 1.0 } }
{ type = "rect", x = 30, y = 130, width = 250, height = 80,
style = { fill = "url(#ocean)", stroke = "none", stroke_width = 0, opacity = 1.0 } }
{ type = "circle", cx = 460, cy = 200, r = 150,
style = { fill = "url(#glow)", stroke = "none", stroke_width = 0, opacity = 1.0 } }
)
<svg xmlns="http://www.w3.org/2000/svg" width="600" height="400" viewBox="0 0 600 400"><rect width="600" height="400" fill="#ffffff"/><defs><linearGradient id="sunset" x1="0" y1="0" x2="1" y2="0" gradientUnits="objectBoundingBox"><stop offset="0" stop-color="#f7971e" stop-opacity="1"/><stop offset="1" stop-color="#ffd200" stop-opacity="1"/></linearGradient><linearGradient id="ocean" x1="0" y1="0" x2="0" y2="1" gradientUnits="objectBoundingBox"><stop offset="0" stop-color="#2196f3" stop-opacity="1"/><stop offset="1" stop-color="#0d47a1" stop-opacity="1"/></linearGradient><radialGradient id="glow" cx="0.5" cy="0.5" r="0.5" fx="0.5" fy="0.5" gradientUnits="objectBoundingBox"><stop offset="0" stop-color="#4facfe" stop-opacity="1"/><stop offset="1" stop-color="#00f2fe00" stop-opacity="0"/></radialGradient></defs><rect x="30" y="30" width="250" height="80" fill="url(#sunset)" stroke="none" stroke-width="0"/><rect x="30" y="130" width="250" height="80" fill="url(#ocean)" stroke="none" stroke-width="0"/><circle cx="460" cy="200" r="150" fill="url(#glow)" stroke="none" stroke-width="0"/></svg>
// examples/image_audio_demo.msx
// Element::Image (both MediaSource variants) + a Def::Audio def.
//
// Left icon: MediaSource::Embedded (a base64 PNG literal, decoded by
// msx-parser, sniff-validated at parse time), anchor = "center" — the
// (x, y) below is the icon's CENTER, not its corner, so it's drawn
// straddling the small red dot rather than starting from it.
//
// Right icon: MediaSource::FileRef (examples/assets/msx_icon.png,
// resolved against this .msx file's own directory at render time — see
// msx-render-cpu's render_to_pixmap_with_base_dir / msx-render-gpu's
// render_with_shader_dir), default anchor ("top_left") — its (x, y) IS
// its corner, so the icon starts exactly at the red dot instead.
//
// Both icons are the same source image, so the anchor difference is the
// only variable — same reasoning as this project's other side-by-side
// comparison examples (see gradients.msx's three gradient types).
//
// The `audio` def below has no visual output anywhere (Def::Audio is a
// deliberate no-op in every renderer, same treatment as Element::Text) —
// it's declared here purely so the corpus has a real, round-tripping
// example of the def existing and parsing correctly, not to be "seen."
@CONFIG( version -> "1.0.0" )
@DATA(
scene = { width = 600, height = 400, background = #12141a }
defs::
// A tiny embedded WAV blip. Nothing plays it — see header comment —
// this def exists only to prove Def::Audio round-trips end to end.
{ type = "audio", id = "blip",
data = "UklGRiwAAABXQVZFZm10IBAAAAABAAEAQB8AAEAfAAABAAgAZGF0YQgAAACAoMDg/+DAoA==" }
elements::
// ── Panel backdrops (purely visual grouping, no functional role) ──
{ type = "rect", x = 40, y = 60, width = 220, height = 220, rx = 12, ry = 12,
style = { fill = #1c2028, stroke = #2a2f3a, stroke_width = 1.5, opacity = 1.0 } }
{ type = "rect", x = 340, y = 60, width = 220, height = 220, rx = 12, ry = 12,
style = { fill = #1c2028, stroke = #2a2f3a, stroke_width = 1.5, opacity = 1.0 } }
// ── Left: embedded PNG, anchor = "center" ──
{ type = "image", id = "icon-embedded",
data = "iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAA+0lEQVR42u2aUQ6DMAxDfYHdYCfeHaYdFbTPSVAKi90+bR98QRO7tImbVMvrvmw9t+djqmcPp/ZezESihbFJYAYSR/gOCYwk0YOti8AIEr24ugkkSZzBpLMDZgL//l5XB84A/oPAaBJXfavK0AjwmwTSJL71JZfhBPgmATeJKttKOXLZVNph9YQoOWuOv6nUunXtJyU2nzMYyB3+3OFYiRjuzCVKZVFXNldSCjikiNJirFoMaoSirFSyfwL4JYTexOgwik5kaCmBFnNoOY0+0KCPlOhDPbqsgi5soUuL6OIuuryObnCgW0z4Jt9PtFnRjW70VQP0ZQ/KdZsVjXa2LBm9fMUAAAAASUVORK5CYII=",
x = 150, y = 170, width = 120, height = 120, anchor = "center" }
{ type = "circle", cx = 150, cy = 170, r = 4,
style = { fill = #ff4d4d, stroke = "none", stroke_width = 0, opacity = 1.0 } }
{ type = "text", x = 150, y = 100, content = "embedded · anchor: center",
style = { fill = #d8dee9, font_size = 13, text_anchor = "middle",
stroke = "none", stroke_width = 0, opacity = 1.0 } }
// ── Right: FileRef PNG, default anchor ("top_left") ──
{ type = "image", id = "icon-fileref",
source_ref = "assets/msx_icon.png",
x = 390, y = 110, width = 120, height = 120 }
{ type = "circle", cx = 390, cy = 110, r = 4,
style = { fill = #ff4d4d, stroke = "none", stroke_width = 0, opacity = 1.0 } }
{ type = "text", x = 390, y = 100, content = "file ref · anchor: top_left (default)",
style = { fill = #d8dee9, font_size = 13, text_anchor = "middle",
stroke = "none", stroke_width = 0, opacity = 1.0 } }
// ── Caption ──
{ type = "text", x = 300, y = 370, content = "Element::Image — embedded + file ref · Def::Audio also declared (silent)",
style = { fill = #8b92a3, font_size = 12, text_anchor = "middle",
stroke = "none", stroke_width = 0, opacity = 1.0 } }
)
<svg xmlns="http://www.w3.org/2000/svg" width="600" height="400" viewBox="0 0 600 400"><rect width="600" height="400" fill="#12141a"/><defs><!-- audio 'blip': not renderable, no playback anywhere in this project yet --></defs><rect x="40" y="60" width="220" height="220" rx="12" ry="12" fill="#1c2028" stroke="#2a2f3a" stroke-width="1.5"/><rect x="340" y="60" width="220" height="220" rx="12" ry="12" fill="#1c2028" stroke="#2a2f3a" stroke-width="1.5"/><image x="90" y="110" width="120" height="120" href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAA+0lEQVR42u2aUQ6DMAxDfYHdYCfeHaYdFbTPSVAKi90+bR98QRO7tImbVMvrvmw9t+djqmcPp/ZezESihbFJYAYSR/gOCYwk0YOti8AIEr24ugkkSZzBpLMDZgL//l5XB84A/oPAaBJXfavK0AjwmwTSJL71JZfhBPgmATeJKttKOXLZVNph9YQoOWuOv6nUunXtJyU2nzMYyB3+3OFYiRjuzCVKZVFXNldSCjikiNJirFoMaoSirFSyfwL4JYTexOgwik5kaCmBFnNoOY0+0KCPlOhDPbqsgi5soUuL6OIuuryObnCgW0z4Jt9PtFnRjW70VQP0ZQ/KdZsVjXa2LBm9fMUAAAAASUVORK5CYII=" id="icon-embedded" fill="#000000" stroke="none" stroke-width="1"/><circle cx="150" cy="170" r="4" fill="#ff4d4d" stroke="none" stroke-width="0"/><text x="150" y="100" fill="#d8dee9" stroke="none" stroke-width="0" font-size="13" text-anchor="middle">embedded · anchor: center</text><image x="390" y="110" width="120" height="120" href="assets/msx_icon.png" id="icon-fileref" fill="#000000" stroke="none" stroke-width="1"/><circle cx="390" cy="110" r="4" fill="#ff4d4d" stroke="none" stroke-width="0"/><text x="390" y="100" fill="#d8dee9" stroke="none" stroke-width="0" font-size="13" text-anchor="middle">file ref · anchor: top_left (default)</text><text x="300" y="370" fill="#8b92a3" stroke="none" stroke-width="0" font-size="12" text-anchor="middle">Element::Image — embedded + file ref · Def::Audio also declared (silent)</text></svg>
// examples/layer_shader_fill.msx
// Tests this session's actual fix: shader fills on a vector shape, an
// SDF node, AND a GaussianSplat all resolving for real when the shape
// lives INSIDE a Layer, not just at the top level. Before this fix,
// render_layer built its own empty Defs and called the plain,
// shader-blind tessellate_elements — a shader ref (or a gradient ref)
// on anything inside a Layer silently painted flat. See layer.rs's
// module doc for the details.
//
// One shared shader def (checker_1, shaders/checkerboard.wgsl) is
// reused for all three rows on purpose — same reasoning as
// sdf_shader_fill.msx/splat_shader_fill.msx: hard edges make a masking
// or routing bug impossible to miss, and reusing one def across three
// very differently-shaped fills (a rect's straight edges, a smooth_union
// blob's curved silhouette, a Gaussian falloff) is a broader diagnostic
// than any one of them alone.
//
// Each row is a plain flat-color shape on the left and the same shape
// shader-filled on the right — if the Layer fix regressed, the right
// side of every row would go back to a flat block of checker_1's own
// fallback_color instead of the real checkerboard pattern.
//
// The whole thing sits inside one Layer at opacity 0.85 (not 1.0) on
// purpose: this is also an implicit regression check on the Layer's own
// isolated-buffer compositing (already working before this session) —
// if that broke while wiring the new shader context through, the whole
// canvas would look wrong (either full-strength, or not blended against
// the background at all), not just the shader routing specifically.
//
// Rendering status, same caveat as every shader-def example in this
// repo: only `msx rasterize-gpu`/`animate-gpu` (msx-render-gpu, built
// with --features gpu) execute this WGSL. `msx rasterize` (CPU) and
// `msx render` (SVG) both resolve every fill to checker_1's own
// fallback_color and paint it flat — unaffected by this session's fix,
// which is GPU-only (mask+color+composite is a GPU-renderer technique;
// CPU/SVG already handled Layer children's shapes correctly, gradients
// included, before this session).
//
// FIXED: the `elements = [...]` array below originally had no commas
// between its six child object literals. DixScript's own grammar doc
// (dixscript/.../data_section_parser.rs) is explicit that commas are
// optional only for the top-level `defs::`/`elements::` block sugar —
// a plain bracketed `[...]` array literal (this one, and `uniforms =
// [...]` a few lines up, which *did* have its commas right) requires
// them, hard error otherwise ("Expected ',' or ']' in array literal").
// That parse failure took both `msx compile` and `msx render` down for
// this file specifically, which is why it never appeared on the Pages
// report at all (not error-badged — `examples.json` only lists stems
// that produced an SVG; a parse failure produces neither compile nor
// render output, so the file was just silently absent from every build
// since it was added).
@CONFIG( version -> "1.0.0" )
@DATA(
scene = { width = 300, height = 630, background = #14141c }
defs::
{ type = "shader", id = "checker_1", source_ref = "shaders/checkerboard.wgsl",
entry_point = "fs_main", fallback_color = #3a3a4a,
uniforms = [ { name = "cells", type = "float", value = 14.0 },
{ name = "resolution", type = "vec2", value = [300.0, 200.0] },
{ name = "color_a", type = "vec3", value = [0.9, 0.9, 0.95] },
{ name = "color_b", type = "vec3", value = [0.16, 0.16, 0.22] } ] }
elements::
{ type = "layer", blend_mode = "normal", opacity = 0.85,
elements = [
// Row 1 (y=100): ordinary vector rects.
{ type = "rect", x = 50, y = 65, width = 70, height = 70,
style = { fill = #4a9eff, stroke = "none", stroke_width = 0, opacity = 1.0 } },
{ type = "rect", x = 170, y = 65, width = 70, height = 70,
style = { fill = "url(#checker_1)", stroke = "none", stroke_width = 0, opacity = 1.0 } },
// Row 2 (y=310): SDF smooth_union blobs — same tree shape as
// sdf_shader_fill.msx, just relocated into this file's grid and
// wrapped in a Layer this time.
{ type = "sdf", fill = #4a9eff,
transform = { type = "translate", x = 85, y = 310 },
tree = { type = "smooth_union", k = 0.35,
children = [ { type = "circle", cx = -22, cy = 0, r = 38 },
{ type = "circle", cx = 22, cy = -10, r = 30 } ] } },
{ type = "sdf", fill = "url(#checker_1)", stroke = #ffffff, stroke_width = 3,
transform = { type = "translate", x = 205, y = 310 },
tree = { type = "smooth_union", k = 0.35,
children = [ { type = "circle", cx = -22, cy = 0, r = 38 },
{ type = "circle", cx = 22, cy = -10, r = 30 } ] } },
// Row 3 (y=520): Gaussian splats.
{ type = "splat", x = 85, y = 520, sigma_x = 45, sigma_y = 45,
color = #4a9eff, opacity = 1.0 },
{ type = "splat", x = 205, y = 520, sigma_x = 45, sigma_y = 45,
fill = "url(#checker_1)", color = #4a9eff, opacity = 1.0 }
] }
)
<svg xmlns="http://www.w3.org/2000/svg" width="300" height="630" viewBox="0 0 300 630"><rect width="300" height="630" fill="#14141c"/><defs><!-- shader 'checker_1': WGSL has no SVG equivalent, renders as none in SVG export (native raster paths use fallback_color #3a3a4a instead) --><radialGradient id="splat-grad-1" cx="0.5" cy="0.5" r="0.5"><stop offset="0%" stop-color="#4a9eff" stop-opacity="1"/><stop offset="55%" stop-color="#4a9eff" stop-opacity="0.35"/><stop offset="100%" stop-color="#4a9eff" stop-opacity="0"/></radialGradient><radialGradient id="splat-grad-2" cx="0.5" cy="0.5" r="0.5"><stop offset="0%" stop-color="#3a3a4a" stop-opacity="1"/><stop offset="55%" stop-color="#3a3a4a" stop-opacity="0.35"/><stop offset="100%" stop-color="#3a3a4a" stop-opacity="0"/></radialGradient></defs><g opacity="0.85"><rect x="50" y="65" width="70" height="70" fill="#4a9eff" stroke="none" stroke-width="0"/><rect x="170" y="65" width="70" height="70" fill="url(#checker_1)" stroke="none" stroke-width="0"/><!-- sdf node 'smooth_union': use msx-render-cpu/msx-render-gpu for native support --><!-- sdf node 'smooth_union': use msx-render-cpu/msx-render-gpu for native support --><ellipse cx="85" cy="520" rx="108" ry="108" fill="url(#splat-grad-1)"/><ellipse cx="205" cy="520" rx="108" ry="108" fill="url(#splat-grad-2)"/></g></svg>
// examples/layer_swap_front.msx
// Demonstrates alternating which of two overlapping Layers reads as
// "in front" over time.
//
// IMPORTANT caveat, up front: this is NOT a document-order / z-index
// swap. `AnimatedProperty` (core/msx-ast/src/animation.rs) only has six
// channels — translate_x/y, scale_x/y, rotate, opacity, the same set
// Lottie/AE/Rive expose — and `resolve_at_time` (core/msx-anim/src/
// resolver.rs) only ever mutates a *matched* element's existing fields
// in place; it never touches `scene.elements`'s array order or the tree
// structure. Two Layers' relative paint order is fixed by document order
// for a scene's entire lifetime, same as any other pair of elements —
// `layer_front`, defined second below, always paints after (i.e. on top
// of) `layer_back` wherever they overlap, at every frame.
//
// What's actually animated: `layer_front`'s own `opacity` — a real,
// independently animatable `Layer` channel (see resolver.rs's
// `Element::Layer(e) => e.opacity *= delta.opacity`, exactly the same
// mechanism `layer_shader_fill.msx`'s static `opacity = 0.85` goes
// through, just driven by a keyframe track here instead of a constant).
// At opacity 1.0 it fully covers `layer_back` in their overlap region —
// reads as "in front". At opacity 0.0 it's invisible there, so
// `layer_back` (held at a constant opacity 1.0 throughout) shows through
// instead — reads as "in front" the other way. `loop_mode = "ping_pong"`
// turns one forward keyframe sweep into a continuous back-and-forth swap
// without needing a second, mirrored set of keyframes — same trick
// orbit_pulse.msx already uses for its own looping motion.
//
// Each "layer" is a deliberate two-element composition (a primary shape
// plus a small accent of a different element type), not a single shape —
// the point is a whole composed layer swapping front/back together, not
// just one shape's opacity. The two accents (a circle on layer_back, a
// rect on layer_front) sit in different corners specifically so which
// layer owns which accent stays legible even mid-fade.
//
// No shader defs anywhere in this file, unlike layer_shader_fill.msx —
// this exercises plain msx-anim + Layer compositing only. Unlike every
// shader-def example in this repo, that means `msx animate` (CPU, GIF)
// shows the real, full effect here too, not just `animate-gpu` — a
// useful contrast if layer_shader_fill.msx's GPU-only caveat is ever
// confusing: this file is the same Layer-animation machinery with that
// one variable removed.
@CONFIG( version -> "1.0.0" )
@DATA(
scene = { width = 320, height = 320, background = #14141c }
duration = 1.6
loop_mode = "ping_pong"
elements::
{ type = "layer", id = "layer_back", opacity = 1.0,
elements = [
{ type = "rect", x = 60, y = 60, width = 200, height = 200,
style = { fill = #4a9eff, stroke = "none", stroke_width = 0, opacity = 1.0 } },
{ type = "circle", cx = 80, cy = 80, r = 18,
style = { fill = #e2e8f0, stroke = "none", stroke_width = 0, opacity = 1.0 } }
] }
{ type = "layer", id = "layer_front", opacity = 1.0,
elements = [
{ type = "circle", cx = 210, cy = 210, r = 110,
style = { fill = #f5a623, stroke = "none", stroke_width = 0, opacity = 1.0 } },
{ type = "rect", x = 250, y = 40, width = 30, height = 30,
style = { fill = #e2e8f0, stroke = "none", stroke_width = 0, opacity = 1.0 } }
] }
animations::
{ target_id = "layer_front", property = "opacity",
keyframes = [ { time = 0.0, value = 1.0 },
{ time = 1.6, value = 0.0, easing = "ease_in_out" } ] }
)
<svg xmlns="http://www.w3.org/2000/svg" width="320" height="320" viewBox="0 0 320 320"><rect width="320" height="320" fill="#14141c"/><g id="layer_back"><rect x="60" y="60" width="200" height="200" fill="#4a9eff" stroke="none" stroke-width="0"/><circle cx="80" cy="80" r="18" fill="#e2e8f0" stroke="none" stroke-width="0"/></g><g id="layer_front"><circle cx="210" cy="210" r="110" fill="#f5a623" stroke="none" stroke-width="0"/><rect x="250" y="40" width="30" height="30" fill="#e2e8f0" stroke="none" stroke-width="0"/></g></svg>
// examples/layer_z_index_swap.msx
// Companion / contrast to layer_swap_front.msx: THIS file is the real
// document-order-independent swap that file explicitly says it is NOT.
//
// layer_swap_front.msx's own header spells out exactly why it couldn't do
// this before this session: `AnimatedProperty` only had six channels
// (translate_x/y, scale_x/y, rotate, opacity) and two Layers' relative
// paint order was fixed by document order for a scene's entire lifetime.
// `AnimatedProperty::ZIndex` (core/msx-ast/src/animation.rs) removes that
// limitation — `Layer.z_index` is now a real, independently animatable
// channel, and unlike every other channel it's a plain OVERRIDE, not a
// composed multiply/add (see resolver.rs: `Element::Layer(e) => if let
// Some(z) = delta.z_index { e.z_index = z }` — a sort key has to stay
// distinguishable from "untouched," so it can't compose the way opacity
// or translate do).
//
// Both Layers below sit at a CONSTANT opacity = 1.0 for the entire
// animation — no fading anywhere in this file. `box_a` and `box_b` are
// both fully opaque, always. What changes is purely which one paints on
// top: `box_a`'s z_index sweeps 0.0 -> 1.0, `box_b`'s sweeps the exact
// complementary 1.0 -> 0.0, over the same `duration` with the same
// (symmetric) easing curve. Since the two tracks are complementary and
// the easing curve is point-symmetric about its own midpoint, the two
// values are EXACTLY equal at t = duration / 2 — at every other instant,
// whichever box's z_index is currently higher wins and paints on top,
// completely and abruptly, since z_index is a discrete sort key with no
// blending involved. That's the "hard-cut paint-order swap": unlike
// layer_swap_front.msx's continuous cross-fade, there is no intermediate
// state here where both boxes are partially visible in their overlap —
// it's always one fully covering the other, until the instant they trade
// places. (At that literal single instant the two z_index values tie;
// `layer_reordered`'s own tie-break falls back to plain document order —
// see layer.rs's `equal_z_index_keeps_original_document_order` test — so
// for exactly one infinitesimal frame `box_b`, declared second below,
// would win a tie. Not perceptible at any real frame rate; noted for
// completeness, not because it's visible.)
//
// Geometry, colors, and canvas size are DELIBERATELY identical to
// layer_swap_front.msx's `layer_back`/`layer_front` (same rect, same
// circle, same accent shapes, same positions) — a real z_index swap next
// to a fake opacity one, everything else held constant, is the clearest
// possible side-by-side demonstration of what the new channel actually
// buys over the old workaround. Each box keeps layer_swap_front.msx's
// own two-element-per-layer composition (a primary shape plus a small
// accent of a different element type) for the same reason that file
// gives: the point is a whole composed Layer swapping paint order
// together, not just one shape's stacking position, and `layer_reordered`
// moving a Layer moves everything inside it as one unit.
//
// Like layer_swap_front.msx and unlike layer_shader_fill.msx, there are
// no shader defs here — plain msx-anim + Layer compositing only — so
// `msx animate` (CPU, GIF) shows the real, full effect, not just
// `animate-gpu`. `loop_mode = "ping_pong"` turns one forward keyframe
// sweep into a continuous back-and-forth swap, same trick every other
// looping example in this repo already uses.
@CONFIG( version -> "1.0.0" )
@DATA(
scene = { width = 320, height = 320, background = #14141c }
duration = 1.6
loop_mode = "ping_pong"
elements::
{ type = "layer", id = "box_a", opacity = 1.0,
elements = [
{ type = "rect", x = 60, y = 60, width = 200, height = 200,
style = { fill = #4a9eff, stroke = "none", stroke_width = 0, opacity = 1.0 } },
{ type = "circle", cx = 80, cy = 80, r = 18,
style = { fill = #e2e8f0, stroke = "none", stroke_width = 0, opacity = 1.0 } }
] }
{ type = "layer", id = "box_b", opacity = 1.0,
elements = [
{ type = "circle", cx = 210, cy = 210, r = 110,
style = { fill = #f5a623, stroke = "none", stroke_width = 0, opacity = 1.0 } },
{ type = "rect", x = 250, y = 40, width = 30, height = 30,
style = { fill = #e2e8f0, stroke = "none", stroke_width = 0, opacity = 1.0 } }
] }
animations::
{ target_id = "box_a", property = "z_index",
keyframes = [ { time = 0.0, value = 0.0 },
{ time = 1.6, value = 1.0, easing = "linear" } ] }
{ target_id = "box_b", property = "z_index",
keyframes = [ { time = 0.0, value = 1.0 },
{ time = 1.6, value = 0.0, easing = "linear" } ] }
)
<svg xmlns="http://www.w3.org/2000/svg" width="320" height="320" viewBox="0 0 320 320"><rect width="320" height="320" fill="#14141c"/><g id="box_a"><rect x="60" y="60" width="200" height="200" fill="#4a9eff" stroke="none" stroke-width="0"/><circle cx="80" cy="80" r="18" fill="#e2e8f0" stroke="none" stroke-width="0"/></g><g id="box_b"><circle cx="210" cy="210" r="110" fill="#f5a623" stroke="none" stroke-width="0"/><rect x="250" y="40" width="30" height="30" fill="#e2e8f0" stroke="none" stroke-width="0"/></g></svg>
// Generated by mid-qr — https://github.com/MidManStudio/mid_qr_code_lib
// Do not edit by hand; re-run the generator to update.
@CONFIG(
version -> "1.0.0"
features -> "data"
)
@DATA(
scene = { width = 400.000, height = 400.000, background = "none" }
elements::
{ type = "rect", x = 0.000, y = 0.000, width = 400.000, height = 400.000, style = { fill = #ffffff } }
{ type = "path", d = "M117.073 39.024H126.829V48.780H117.073Z M195.122 39.024H204.878V48.780H195.122Z M214.634 39.024H224.390V48.780H214.634Z M224.390 39.024H234.146V48.780H224.390Z M234.146 39.024H243.902V48.780H234.146Z M263.415 39.024H273.171V48.780H263.415Z M117.073 48.780H126.829V58.537H117.073Z M126.829 48.780H136.585V58.537H126.829Z M146.341 48.780H156.098V58.537H146.341Z M156.098 48.780H165.854V58.537H156.098Z M175.610 48.780H185.366V58.537H175.610Z M204.878 48.780H214.634V58.537H204.878Z M253.659 48.780H263.415V58.537H253.659Z M263.415 48.780H273.171V58.537H263.415Z M273.171 48.780H282.927V58.537H273.171Z M126.829 58.537H136.585V68.293H126.829Z M165.854 58.537H175.610V68.293H165.854Z M175.610 58.537H185.366V68.293H175.610Z M214.634 58.537H224.390V68.293H214.634Z M224.390 58.537H234.146V68.293H224.390Z M253.659 58.537H263.415V68.293H253.659Z M273.171 58.537H282.927V68.293H273.171Z M117.073 68.293H126.829V78.049H117.073Z M136.585 68.293H146.341V78.049H136.585Z M156.098 68.293H165.854V78.049H156.098Z M185.366 68.293H195.122V78.049H185.366Z M214.634 68.293H224.390V78.049H214.634Z M224.390 68.293H234.146V78.049H224.390Z M253.659 68.293H263.415V78.049H253.659Z M273.171 68.293H282.927V78.049H273.171Z M156.098 78.049H165.854V87.805H156.098Z M165.854 78.049H175.610V87.805H165.854Z M195.122 78.049H204.878V87.805H195.122Z M204.878 78.049H214.634V87.805H204.878Z M214.634 78.049H224.390V87.805H214.634Z M273.171 78.049H282.927V87.805H273.171Z M126.829 87.805H136.585V97.561H126.829Z M136.585 87.805H146.341V97.561H136.585Z M165.854 87.805H175.610V97.561H165.854Z M185.366 87.805H195.122V97.561H185.366Z M195.122 87.805H204.878V97.561H195.122Z M214.634 87.805H224.390V97.561H214.634Z M243.902 87.805H253.659V97.561H243.902Z M253.659 87.805H263.415V97.561H253.659Z M273.171 87.805H282.927V97.561H273.171Z M117.073 97.561H126.829V107.317H117.073Z M136.585 97.561H146.341V107.317H136.585Z M156.098 97.561H165.854V107.317H156.098Z M175.610 97.561H185.366V107.317H175.610Z M195.122 97.561H204.878V107.317H195.122Z M214.634 97.561H224.390V107.317H214.634Z M234.146 97.561H243.902V107.317H234.146Z M253.659 97.561H263.415V107.317H253.659Z M273.171 97.561H282.927V107.317H273.171Z M117.073 107.317H126.829V117.073H117.073Z M126.829 107.317H136.585V117.073H126.829Z M156.098 107.317H165.854V117.073H156.098Z M185.366 107.317H195.122V117.073H185.366Z M195.122 107.317H204.878V117.073H195.122Z M204.878 107.317H214.634V117.073H204.878Z M224.390 107.317H234.146V117.073H224.390Z M273.171 107.317H282.927V117.073H273.171Z M39.024 117.073H48.780V126.829H39.024Z M58.537 117.073H68.293V126.829H58.537Z M68.293 117.073H78.049V126.829H68.293Z M87.805 117.073H97.561V126.829H87.805Z M97.561 117.073H107.317V126.829H97.561Z M107.317 117.073H117.073V126.829H107.317Z M175.610 117.073H185.366V126.829H175.610Z M185.366 117.073H195.122V126.829H185.366Z M195.122 117.073H204.878V126.829H195.122Z M214.634 117.073H224.390V126.829H214.634Z M243.902 117.073H253.659V126.829H243.902Z M253.659 117.073H263.415V126.829H253.659Z M263.415 117.073H273.171V126.829H263.415Z M273.171 117.073H282.927V126.829H273.171Z M292.683 117.073H302.439V126.829H292.683Z M321.951 117.073H331.707V126.829H321.951Z M341.463 117.073H351.220V126.829H341.463Z M351.220 117.073H360.976V126.829H351.220Z M48.780 126.829H58.537V136.585H48.780Z M87.805 126.829H97.561V136.585H87.805Z M126.829 126.829H136.585V136.585H126.829Z M165.854 126.829H175.610V136.585H165.854Z M195.122 126.829H204.878V136.585H195.122Z M204.878 126.829H214.634V136.585H204.878Z M214.634 126.829H224.390V136.585H214.634Z M224.390 126.829H234.146V136.585H224.390Z M234.146 126.829H243.902V136.585H234.146Z M263.415 126.829H273.171V136.585H263.415Z M292.683 126.829H302.439V136.585H292.683Z M302.439 126.829H312.195V136.585H302.439Z M321.951 126.829H331.707V136.585H321.951Z M331.707 126.829H341.463V136.585H331.707Z M351.220 126.829H360.976V136.585H351.220Z M39.024 136.585H48.780V146.341H39.024Z M48.780 136.585H58.537V146.341H48.780Z M68.293 136.585H78.049V146.341H68.293Z M78.049 136.585H87.805V146.341H78.049Z M97.561 136.585H107.317V146.341H97.561Z M107.317 136.585H117.073V146.341H107.317Z M126.829 136.585H136.585V146.341H126.829Z M156.098 136.585H165.854V146.341H156.098Z M165.854 136.585H175.610V146.341H165.854Z M195.122 136.585H204.878V146.341H195.122Z M214.634 136.585H224.390V146.341H214.634Z M263.415 136.585H273.171V146.341H263.415Z M282.927 136.585H292.683V146.341H282.927Z M302.439 136.585H312.195V146.341H302.439Z M312.195 136.585H321.951V146.341H312.195Z M321.951 136.585H331.707V146.341H321.951Z M341.463 136.585H351.220V146.341H341.463Z M351.220 136.585H360.976V146.341H351.220Z M48.780 146.341H58.537V156.098H48.780Z M68.293 146.341H78.049V156.098H68.293Z M78.049 146.341H87.805V156.098H78.049Z M107.317 146.341H117.073V156.098H107.317Z M117.073 146.341H126.829V156.098H117.073Z M136.585 146.341H146.341V156.098H136.585Z M146.341 146.341H156.098V156.098H146.341Z M204.878 146.341H214.634V156.098H204.878Z M224.390 146.341H234.146V156.098H224.390Z M234.146 146.341H243.902V156.098H234.146Z M292.683 146.341H302.439V156.098H292.683Z M302.439 146.341H312.195V156.098H302.439Z M321.951 146.341H331.707V156.098H321.951Z M68.293 156.098H78.049V165.854H68.293Z M97.561 156.098H107.317V165.854H97.561Z M107.317 156.098H117.073V165.854H107.317Z M117.073 156.098H126.829V165.854H117.073Z M136.585 156.098H146.341V165.854H136.585Z M175.610 156.098H185.366V165.854H175.610Z M185.366 156.098H195.122V165.854H185.366Z M195.122 156.098H204.878V165.854H195.122Z M224.390 156.098H234.146V165.854H224.390Z M234.146 156.098H243.902V165.854H234.146Z M253.659 156.098H263.415V165.854H253.659Z M263.415 156.098H273.171V165.854H263.415Z M282.927 156.098H292.683V165.854H282.927Z M321.951 156.098H331.707V165.854H321.951Z M341.463 156.098H351.220V165.854H341.463Z M351.220 156.098H360.976V165.854H351.220Z M48.780 165.854H58.537V175.610H48.780Z M58.537 165.854H68.293V175.610H58.537Z M68.293 165.854H78.049V175.610H68.293Z M87.805 165.854H97.561V175.610H87.805Z M107.317 165.854H117.073V175.610H107.317Z M117.073 165.854H126.829V175.610H117.073Z M165.854 165.854H175.610V175.610H165.854Z M175.610 165.854H185.366V175.610H175.610Z M234.146 165.854H243.902V175.610H234.146Z M243.902 165.854H253.659V175.610H243.902Z M263.415 165.854H273.171V175.610H263.415Z M273.171 165.854H282.927V175.610H273.171Z M302.439 165.854H312.195V175.610H302.439Z M321.951 165.854H331.707V175.610H321.951Z M331.707 165.854H341.463V175.610H331.707Z M341.463 165.854H351.220V175.610H341.463Z M39.024 175.610H48.780V185.366H39.024Z M58.537 175.610H68.293V185.366H58.537Z M78.049 175.610H87.805V185.366H78.049Z M97.561 175.610H107.317V185.366H97.561Z M117.073 175.610H126.829V185.366H117.073Z M136.585 175.610H146.341V185.366H136.585Z M146.341 175.610H156.098V185.366H146.341Z M156.098 175.610H165.854V185.366H156.098Z M214.634 175.610H224.390V185.366H214.634Z M224.390 175.610H234.146V185.366H224.390Z M234.146 175.610H243.902V185.366H234.146Z M243.902 175.610H253.659V185.366H243.902Z M273.171 175.610H282.927V185.366H273.171Z M292.683 175.610H302.439V185.366H292.683Z M321.951 175.610H331.707V185.366H321.951Z M39.024 185.366H48.780V195.122H39.024Z M68.293 185.366H78.049V195.122H68.293Z M78.049 185.366H87.805V195.122H78.049Z M87.805 185.366H97.561V195.122H87.805Z M107.317 185.366H117.073V195.122H107.317Z M126.829 185.366H136.585V195.122H126.829Z M185.366 185.366H195.122V195.122H185.366Z M243.902 185.366H253.659V195.122H243.902Z M282.927 185.366H292.683V195.122H282.927Z M292.683 185.366H302.439V195.122H292.683Z M302.439 185.366H312.195V195.122H302.439Z M321.951 185.366H331.707V195.122H321.951Z M331.707 185.366H341.463V195.122H331.707Z M58.537 195.122H68.293V204.878H58.537Z M68.293 195.122H78.049V204.878H68.293Z M78.049 195.122H87.805V204.878H78.049Z M87.805 195.122H97.561V204.878H87.805Z M97.561 195.122H107.317V204.878H97.561Z M117.073 195.122H126.829V204.878H117.073Z M126.829 195.122H136.585V204.878H126.829Z M165.854 195.122H175.610V204.878H165.854Z M195.122 195.122H204.878V204.878H195.122Z M214.634 195.122H224.390V204.878H214.634Z M234.146 195.122H243.902V204.878H234.146Z M243.902 195.122H253.659V204.878H243.902Z M253.659 195.122H263.415V204.878H253.659Z M263.415 195.122H273.171V204.878H263.415Z M282.927 195.122H292.683V204.878H282.927Z M292.683 195.122H302.439V204.878H292.683Z M312.195 195.122H321.951V204.878H312.195Z M321.951 195.122H331.707V204.878H321.951Z M331.707 195.122H341.463V204.878H331.707Z M58.537 204.878H68.293V214.634H58.537Z M78.049 204.878H87.805V214.634H78.049Z M87.805 204.878H97.561V214.634H87.805Z M136.585 204.878H146.341V214.634H136.585Z M156.098 204.878H165.854V214.634H156.098Z M165.854 204.878H175.610V214.634H165.854Z M175.610 204.878H185.366V214.634H175.610Z M185.366 204.878H195.122V214.634H185.366Z M224.390 204.878H234.146V214.634H224.390Z M234.146 204.878H243.902V214.634H234.146Z M253.659 204.878H263.415V214.634H253.659Z M263.415 204.878H273.171V214.634H263.415Z M273.171 204.878H282.927V214.634H273.171Z M282.927 204.878H292.683V214.634H282.927Z M292.683 204.878H302.439V214.634H292.683Z M312.195 204.878H321.951V214.634H312.195Z M321.951 204.878H331.707V214.634H321.951Z M341.463 204.878H351.220V214.634H341.463Z M351.220 204.878H360.976V214.634H351.220Z M39.024 214.634H48.780V224.390H39.024Z M48.780 214.634H58.537V224.390H48.780Z M68.293 214.634H78.049V224.390H68.293Z M78.049 214.634H87.805V224.390H78.049Z M87.805 214.634H97.561V224.390H87.805Z M97.561 214.634H107.317V224.390H97.561Z M117.073 214.634H126.829V224.390H117.073Z M156.098 214.634H165.854V224.390H156.098Z M185.366 214.634H195.122V224.390H185.366Z M214.634 214.634H224.390V224.390H214.634Z M234.146 214.634H243.902V224.390H234.146Z M273.171 214.634H282.927V224.390H273.171Z M302.439 214.634H312.195V224.390H302.439Z M312.195 214.634H321.951V224.390H312.195Z M331.707 214.634H341.463V224.390H331.707Z M341.463 214.634H351.220V224.390H341.463Z M48.780 224.390H58.537V234.146H48.780Z M68.293 224.390H78.049V234.146H68.293Z M87.805 224.390H97.561V234.146H87.805Z M117.073 224.390H126.829V234.146H117.073Z M126.829 224.390H136.585V234.146H126.829Z M146.341 224.390H156.098V234.146H146.341Z M156.098 224.390H165.854V234.146H156.098Z M175.610 224.390H185.366V234.146H175.610Z M195.122 224.390H204.878V234.146H195.122Z M204.878 224.390H214.634V234.146H204.878Z M214.634 224.390H224.390V234.146H214.634Z M224.390 224.390H234.146V234.146H224.390Z M263.415 224.390H273.171V234.146H263.415Z M273.171 224.390H282.927V234.146H273.171Z M282.927 224.390H292.683V234.146H282.927Z M312.195 224.390H321.951V234.146H312.195Z M341.463 224.390H351.220V234.146H341.463Z M58.537 234.146H68.293V243.902H58.537Z M78.049 234.146H87.805V243.902H78.049Z M97.561 234.146H107.317V243.902H97.561Z M107.317 234.146H117.073V243.902H107.317Z M117.073 234.146H126.829V243.902H117.073Z M136.585 234.146H146.341V243.902H136.585Z M156.098 234.146H165.854V243.902H156.098Z M195.122 234.146H204.878V243.902H195.122Z M253.659 234.146H263.415V243.902H253.659Z M302.439 234.146H312.195V243.902H302.439Z M321.951 234.146H331.707V243.902H321.951Z M331.707 234.146H341.463V243.902H331.707Z M351.220 234.146H360.976V243.902H351.220Z M39.024 243.902H48.780V253.659H39.024Z M78.049 243.902H87.805V253.659H78.049Z M87.805 243.902H97.561V253.659H87.805Z M117.073 243.902H126.829V253.659H117.073Z M126.829 243.902H136.585V253.659H126.829Z M136.585 243.902H146.341V253.659H136.585Z M146.341 243.902H156.098V253.659H146.341Z M156.098 243.902H165.854V253.659H156.098Z M175.610 243.902H185.366V253.659H175.610Z M185.366 243.902H195.122V253.659H185.366Z M195.122 243.902H204.878V253.659H195.122Z M234.146 243.902H243.902V253.659H234.146Z M243.902 243.902H253.659V253.659H243.902Z M263.415 243.902H273.171V253.659H263.415Z M292.683 243.902H302.439V253.659H292.683Z M321.951 243.902H331.707V253.659H321.951Z M331.707 243.902H341.463V253.659H331.707Z M351.220 243.902H360.976V253.659H351.220Z M87.805 253.659H97.561V263.415H87.805Z M97.561 253.659H107.317V263.415H97.561Z M107.317 253.659H117.073V263.415H107.317Z M117.073 253.659H126.829V263.415H117.073Z M136.585 253.659H146.341V263.415H136.585Z M156.098 253.659H165.854V263.415H156.098Z M185.366 253.659H195.122V263.415H185.366Z M204.878 253.659H214.634V263.415H204.878Z M224.390 253.659H234.146V263.415H224.390Z M234.146 253.659H243.902V263.415H234.146Z M243.902 253.659H253.659V263.415H243.902Z M263.415 253.659H273.171V263.415H263.415Z M282.927 253.659H292.683V263.415H282.927Z M292.683 253.659H302.439V263.415H292.683Z M302.439 253.659H312.195V263.415H302.439Z M321.951 253.659H331.707V263.415H321.951Z M341.463 253.659H351.220V263.415H341.463Z M351.220 253.659H360.976V263.415H351.220Z M48.780 263.415H58.537V273.171H48.780Z M58.537 263.415H68.293V273.171H58.537Z M68.293 263.415H78.049V273.171H68.293Z M78.049 263.415H87.805V273.171H78.049Z M87.805 263.415H97.561V273.171H87.805Z M107.317 263.415H117.073V273.171H107.317Z M117.073 263.415H126.829V273.171H117.073Z M126.829 263.415H136.585V273.171H126.829Z M136.585 263.415H146.341V273.171H136.585Z M146.341 263.415H156.098V273.171H146.341Z M156.098 263.415H165.854V273.171H156.098Z M165.854 263.415H175.610V273.171H165.854Z M185.366 263.415H195.122V273.171H185.366Z M214.634 263.415H224.390V273.171H214.634Z M234.146 263.415H243.902V273.171H234.146Z M273.171 263.415H282.927V273.171H273.171Z M292.683 263.415H302.439V273.171H292.683Z M312.195 263.415H321.951V273.171H312.195Z M321.951 263.415H331.707V273.171H321.951Z M351.220 263.415H360.976V273.171H351.220Z M39.024 273.171H48.780V282.927H39.024Z M68.293 273.171H78.049V282.927H68.293Z M78.049 273.171H87.805V282.927H78.049Z M97.561 273.171H107.317V282.927H97.561Z M117.073 273.171H126.829V282.927H117.073Z M136.585 273.171H146.341V282.927H136.585Z M146.341 273.171H156.098V282.927H146.341Z M156.098 273.171H165.854V282.927H156.098Z M165.854 273.171H175.610V282.927H165.854Z M175.610 273.171H185.366V282.927H175.610Z M195.122 273.171H204.878V282.927H195.122Z M204.878 273.171H214.634V282.927H204.878Z M224.390 273.171H234.146V282.927H224.390Z M253.659 273.171H263.415V282.927H253.659Z M273.171 273.171H282.927V282.927H273.171Z M282.927 273.171H292.683V282.927H282.927Z M292.683 273.171H302.439V282.927H292.683Z M302.439 273.171H312.195V282.927H302.439Z M312.195 273.171H321.951V282.927H312.195Z M321.951 273.171H331.707V282.927H321.951Z M331.707 273.171H341.463V282.927H331.707Z M341.463 273.171H351.220V282.927H341.463Z M351.220 273.171H360.976V282.927H351.220Z M117.073 282.927H126.829V292.683H117.073Z M126.829 282.927H136.585V292.683H126.829Z M136.585 282.927H146.341V292.683H136.585Z M156.098 282.927H165.854V292.683H156.098Z M175.610 282.927H185.366V292.683H175.610Z M185.366 282.927H195.122V292.683H185.366Z M195.122 282.927H204.878V292.683H195.122Z M224.390 282.927H234.146V292.683H224.390Z M234.146 282.927H243.902V292.683H234.146Z M243.902 282.927H253.659V292.683H243.902Z M273.171 282.927H282.927V292.683H273.171Z M312.195 282.927H321.951V292.683H312.195Z M321.951 282.927H331.707V292.683H321.951Z M117.073 292.683H126.829V302.439H117.073Z M146.341 292.683H156.098V302.439H146.341Z M156.098 292.683H165.854V302.439H156.098Z M165.854 292.683H175.610V302.439H165.854Z M175.610 292.683H185.366V302.439H175.610Z M204.878 292.683H214.634V302.439H204.878Z M214.634 292.683H224.390V302.439H214.634Z M224.390 292.683H234.146V302.439H224.390Z M234.146 292.683H243.902V302.439H234.146Z M243.902 292.683H253.659V302.439H243.902Z M263.415 292.683H273.171V302.439H263.415Z M273.171 292.683H282.927V302.439H273.171Z M292.683 292.683H302.439V302.439H292.683Z M312.195 292.683H321.951V302.439H312.195Z M341.463 292.683H351.220V302.439H341.463Z M117.073 302.439H126.829V312.195H117.073Z M126.829 302.439H136.585V312.195H126.829Z M146.341 302.439H156.098V312.195H146.341Z M156.098 302.439H165.854V312.195H156.098Z M204.878 302.439H214.634V312.195H204.878Z M214.634 302.439H224.390V312.195H214.634Z M234.146 302.439H243.902V312.195H234.146Z M263.415 302.439H273.171V312.195H263.415Z M273.171 302.439H282.927V312.195H273.171Z M312.195 302.439H321.951V312.195H312.195Z M321.951 302.439H331.707V312.195H321.951Z M331.707 302.439H341.463V312.195H331.707Z M341.463 302.439H351.220V312.195H341.463Z M351.220 302.439H360.976V312.195H351.220Z M136.585 312.195H146.341V321.951H136.585Z M146.341 312.195H156.098V321.951H146.341Z M156.098 312.195H165.854V321.951H156.098Z M165.854 312.195H175.610V321.951H165.854Z M195.122 312.195H204.878V321.951H195.122Z M204.878 312.195H214.634V321.951H204.878Z M214.634 312.195H224.390V321.951H214.634Z M224.390 312.195H234.146V321.951H224.390Z M253.659 312.195H263.415V321.951H253.659Z M263.415 312.195H273.171V321.951H263.415Z M273.171 312.195H282.927V321.951H273.171Z M282.927 312.195H292.683V321.951H282.927Z M292.683 312.195H302.439V321.951H292.683Z M302.439 312.195H312.195V321.951H302.439Z M312.195 312.195H321.951V321.951H312.195Z M331.707 312.195H341.463V321.951H331.707Z M341.463 312.195H351.220V321.951H341.463Z M117.073 321.951H126.829V331.707H117.073Z M126.829 321.951H136.585V331.707H126.829Z M195.122 321.951H204.878V331.707H195.122Z M204.878 321.951H214.634V331.707H204.878Z M224.390 321.951H234.146V331.707H224.390Z M243.902 321.951H253.659V331.707H243.902Z M253.659 321.951H263.415V331.707H253.659Z M263.415 321.951H273.171V331.707H263.415Z M302.439 321.951H312.195V331.707H302.439Z M321.951 321.951H331.707V331.707H321.951Z M331.707 321.951H341.463V331.707H331.707Z M341.463 321.951H351.220V331.707H341.463Z M351.220 321.951H360.976V331.707H351.220Z M117.073 331.707H126.829V341.463H117.073Z M126.829 331.707H136.585V341.463H126.829Z M136.585 331.707H146.341V341.463H136.585Z M156.098 331.707H165.854V341.463H156.098Z M165.854 331.707H175.610V341.463H165.854Z M185.366 331.707H195.122V341.463H185.366Z M195.122 331.707H204.878V341.463H195.122Z M204.878 331.707H214.634V341.463H204.878Z M234.146 331.707H243.902V341.463H234.146Z M253.659 331.707H263.415V341.463H253.659Z M292.683 331.707H302.439V341.463H292.683Z M302.439 331.707H312.195V341.463H302.439Z M321.951 331.707H331.707V341.463H321.951Z M126.829 341.463H136.585V351.220H126.829Z M136.585 341.463H146.341V351.220H136.585Z M204.878 341.463H214.634V351.220H204.878Z M234.146 341.463H243.902V351.220H234.146Z M253.659 341.463H263.415V351.220H253.659Z M263.415 341.463H273.171V351.220H263.415Z M273.171 341.463H282.927V351.220H273.171Z M282.927 341.463H292.683V351.220H282.927Z M302.439 341.463H312.195V351.220H302.439Z M312.195 341.463H321.951V351.220H312.195Z M351.220 341.463H360.976V351.220H351.220Z M117.073 351.220H126.829V360.976H117.073Z M126.829 351.220H136.585V360.976H126.829Z M146.341 351.220H156.098V360.976H146.341Z M214.634 351.220H224.390V360.976H214.634Z M224.390 351.220H234.146V360.976H224.390Z M243.902 351.220H253.659V360.976H243.902Z M263.415 351.220H273.171V360.976H263.415Z M292.683 351.220H302.439V360.976H292.683Z M312.195 351.220H321.951V360.976H312.195Z M321.951 351.220H331.707V360.976H321.951Z M331.707 351.220H341.463V360.976H331.707Z", style = { fill = "#000000" } }
{ type = "path", d = "M39.024 39.024H107.317V107.317H39.024ZM48.780 48.780H97.561V97.561H48.780Z", style = { fill = #000000, fill_rule = "evenodd" } }
{ type = "rect", x = 58.537, y = 58.537, width = 29.268, height = 29.268, style = { fill = #000000 } }
{ type = "path", d = "M292.683 39.024H360.976V107.317H292.683ZM302.439 48.780H351.220V97.561H302.439Z", style = { fill = #000000, fill_rule = "evenodd" } }
{ type = "rect", x = 312.195, y = 58.537, width = 29.268, height = 29.268, style = { fill = #000000 } }
{ type = "path", d = "M39.024 292.683H107.317V360.976H39.024ZM48.780 302.439H97.561V351.220H48.780Z", style = { fill = #000000, fill_rule = "evenodd" } }
{ type = "rect", x = 58.537, y = 312.195, width = 29.268, height = 29.268, style = { fill = #000000 } }
)
<svg xmlns="http://www.w3.org/2000/svg" width="400" height="400" viewBox="0 0 400 400"><rect width="400" height="400" fill="#00000000"/><rect x="0" y="0" width="400" height="400" fill="#ffffff" stroke="none" stroke-width="1"/><path d="M 117.073 39.024 H 126.829 V 48.78 H 117.073 Z M 195.122 39.024 H 204.878 V 48.78 H 195.122 Z M 214.634 39.024 H 224.39 V 48.78 H 214.634 Z M 224.39 39.024 H 234.146 V 48.78 H 224.39 Z M 234.146 39.024 H 243.902 V 48.78 H 234.146 Z M 263.415 39.024 H 273.171 V 48.78 H 263.415 Z M 117.073 48.78 H 126.829 V 58.537 H 117.073 Z M 126.829 48.78 H 136.585 V 58.537 H 126.829 Z M 146.341 48.78 H 156.098 V 58.537 H 146.341 Z M 156.098 48.78 H 165.854 V 58.537 H 156.098 Z M 175.61 48.78 H 185.366 V 58.537 H 175.61 Z M 204.878 48.78 H 214.634 V 58.537 H 204.878 Z M 253.659 48.78 H 263.415 V 58.537 H 253.659 Z M 263.415 48.78 H 273.171 V 58.537 H 263.415 Z M 273.171 48.78 H 282.927 V 58.537 H 273.171 Z M 126.829 58.537 H 136.585 V 68.293 H 126.829 Z M 165.854 58.537 H 175.61 V 68.293 H 165.854 Z M 175.61 58.537 H 185.366 V 68.293 H 175.61 Z M 214.634 58.537 H 224.39 V 68.293 H 214.634 Z M 224.39 58.537 H 234.146 V 68.293 H 224.39 Z M 253.659 58.537 H 263.415 V 68.293 H 253.659 Z M 273.171 58.537 H 282.927 V 68.293 H 273.171 Z M 117.073 68.293 H 126.829 V 78.049 H 117.073 Z M 136.585 68.293 H 146.341 V 78.049 H 136.585 Z M 156.098 68.293 H 165.854 V 78.049 H 156.098 Z M 185.366 68.293 H 195.122 V 78.049 H 185.366 Z M 214.634 68.293 H 224.39 V 78.049 H 214.634 Z M 224.39 68.293 H 234.146 V 78.049 H 224.39 Z M 253.659 68.293 H 263.415 V 78.049 H 253.659 Z M 273.171 68.293 H 282.927 V 78.049 H 273.171 Z M 156.098 78.049 H 165.854 V 87.805 H 156.098 Z M 165.854 78.049 H 175.61 V 87.805 H 165.854 Z M 195.122 78.049 H 204.878 V 87.805 H 195.122 Z M 204.878 78.049 H 214.634 V 87.805 H 204.878 Z M 214.634 78.049 H 224.39 V 87.805 H 214.634 Z M 273.171 78.049 H 282.927 V 87.805 H 273.171 Z M 126.829 87.805 H 136.585 V 97.561 H 126.829 Z M 136.585 87.805 H 146.341 V 97.561 H 136.585 Z M 165.854 87.805 H 175.61 V 97.561 H 165.854 Z M 185.366 87.805 H 195.122 V 97.561 H 185.366 Z M 195.122 87.805 H 204.878 V 97.561 H 195.122 Z M 214.634 87.805 H 224.39 V 97.561 H 214.634 Z M 243.902 87.805 H 253.659 V 97.561 H 243.902 Z M 253.659 87.805 H 263.415 V 97.561 H 253.659 Z M 273.171 87.805 H 282.927 V 97.561 H 273.171 Z M 117.073 97.561 H 126.829 V 107.317 H 117.073 Z M 136.585 97.561 H 146.341 V 107.317 H 136.585 Z M 156.098 97.561 H 165.854 V 107.317 H 156.098 Z M 175.61 97.561 H 185.366 V 107.317 H 175.61 Z M 195.122 97.561 H 204.878 V 107.317 H 195.122 Z M 214.634 97.561 H 224.39 V 107.317 H 214.634 Z M 234.146 97.561 H 243.902 V 107.317 H 234.146 Z M 253.659 97.561 H 263.415 V 107.317 H 253.659 Z M 273.171 97.561 H 282.927 V 107.317 H 273.171 Z M 117.073 107.317 H 126.829 V 117.073 H 117.073 Z M 126.829 107.317 H 136.585 V 117.073 H 126.829 Z M 156.098 107.317 H 165.854 V 117.073 H 156.098 Z M 185.366 107.317 H 195.122 V 117.073 H 185.366 Z M 195.122 107.317 H 204.878 V 117.073 H 195.122 Z M 204.878 107.317 H 214.634 V 117.073 H 204.878 Z M 224.39 107.317 H 234.146 V 117.073 H 224.39 Z M 273.171 107.317 H 282.927 V 117.073 H 273.171 Z M 39.024 117.073 H 48.78 V 126.829 H 39.024 Z M 58.537 117.073 H 68.293 V 126.829 H 58.537 Z M 68.293 117.073 H 78.049 V 126.829 H 68.293 Z M 87.805 117.073 H 97.561 V 126.829 H 87.805 Z M 97.561 117.073 H 107.317 V 126.829 H 97.561 Z M 107.317 117.073 H 117.073 V 126.829 H 107.317 Z M 175.61 117.073 H 185.366 V 126.829 H 175.61 Z M 185.366 117.073 H 195.122 V 126.829 H 185.366 Z M 195.122 117.073 H 204.878 V 126.829 H 195.122 Z M 214.634 117.073 H 224.39 V 126.829 H 214.634 Z M 243.902 117.073 H 253.659 V 126.829 H 243.902 Z M 253.659 117.073 H 263.415 V 126.829 H 253.659 Z M 263.415 117.073 H 273.171 V 126.829 H 263.415 Z M 273.171 117.073 H 282.927 V 126.829 H 273.171 Z M 292.683 117.073 H 302.439 V 126.829 H 292.683 Z M 321.951 117.073 H 331.707 V 126.829 H 321.951 Z M 341.463 117.073 H 351.22 V 126.829 H 341.463 Z M 351.22 117.073 H 360.976 V 126.829 H 351.22 Z M 48.78 126.829 H 58.537 V 136.585 H 48.78 Z M 87.805 126.829 H 97.561 V 136.585 H 87.805 Z M 126.829 126.829 H 136.585 V 136.585 H 126.829 Z M 165.854 126.829 H 175.61 V 136.585 H 165.854 Z M 195.122 126.829 H 204.878 V 136.585 H 195.122 Z M 204.878 126.829 H 214.634 V 136.585 H 204.878 Z M 214.634 126.829 H 224.39 V 136.585 H 214.634 Z M 224.39 126.829 H 234.146 V 136.585 H 224.39 Z M 234.146 126.829 H 243.902 V 136.585 H 234.146 Z M 263.415 126.829 H 273.171 V 136.585 H 263.415 Z M 292.683 126.829 H 302.439 V 136.585 H 292.683 Z M 302.439 126.829 H 312.195 V 136.585 H 302.439 Z M 321.951 126.829 H 331.707 V 136.585 H 321.951 Z M 331.707 126.829 H 341.463 V 136.585 H 331.707 Z M 351.22 126.829 H 360.976 V 136.585 H 351.22 Z M 39.024 136.585 H 48.78 V 146.341 H 39.024 Z M 48.78 136.585 H 58.537 V 146.341 H 48.78 Z M 68.293 136.585 H 78.049 V 146.341 H 68.293 Z M 78.049 136.585 H 87.805 V 146.341 H 78.049 Z M 97.561 136.585 H 107.317 V 146.341 H 97.561 Z M 107.317 136.585 H 117.073 V 146.341 H 107.317 Z M 126.829 136.585 H 136.585 V 146.341 H 126.829 Z M 156.098 136.585 H 165.854 V 146.341 H 156.098 Z M 165.854 136.585 H 175.61 V 146.341 H 165.854 Z M 195.122 136.585 H 204.878 V 146.341 H 195.122 Z M 214.634 136.585 H 224.39 V 146.341 H 214.634 Z M 263.415 136.585 H 273.171 V 146.341 H 263.415 Z M 282.927 136.585 H 292.683 V 146.341 H 282.927 Z M 302.439 136.585 H 312.195 V 146.341 H 302.439 Z M 312.195 136.585 H 321.951 V 146.341 H 312.195 Z M 321.951 136.585 H 331.707 V 146.341 H 321.951 Z M 341.463 136.585 H 351.22 V 146.341 H 341.463 Z M 351.22 136.585 H 360.976 V 146.341 H 351.22 Z M 48.78 146.341 H 58.537 V 156.098 H 48.78 Z M 68.293 146.341 H 78.049 V 156.098 H 68.293 Z M 78.049 146.341 H 87.805 V 156.098 H 78.049 Z M 107.317 146.341 H 117.073 V 156.098 H 107.317 Z M 117.073 146.341 H 126.829 V 156.098 H 117.073 Z M 136.585 146.341 H 146.341 V 156.098 H 136.585 Z M 146.341 146.341 H 156.098 V 156.098 H 146.341 Z M 204.878 146.341 H 214.634 V 156.098 H 204.878 Z M 224.39 146.341 H 234.146 V 156.098 H 224.39 Z M 234.146 146.341 H 243.902 V 156.098 H 234.146 Z M 292.683 146.341 H 302.439 V 156.098 H 292.683 Z M 302.439 146.341 H 312.195 V 156.098 H 302.439 Z M 321.951 146.341 H 331.707 V 156.098 H 321.951 Z M 68.293 156.098 H 78.049 V 165.854 H 68.293 Z M 97.561 156.098 H 107.317 V 165.854 H 97.561 Z M 107.317 156.098 H 117.073 V 165.854 H 107.317 Z M 117.073 156.098 H 126.829 V 165.854 H 117.073 Z M 136.585 156.098 H 146.341 V 165.854 H 136.585 Z M 175.61 156.098 H 185.366 V 165.854 H 175.61 Z M 185.366 156.098 H 195.122 V 165.854 H 185.366 Z M 195.122 156.098 H 204.878 V 165.854 H 195.122 Z M 224.39 156.098 H 234.146 V 165.854 H 224.39 Z M 234.146 156.098 H 243.902 V 165.854 H 234.146 Z M 253.659 156.098 H 263.415 V 165.854 H 253.659 Z M 263.415 156.098 H 273.171 V 165.854 H 263.415 Z M 282.927 156.098 H 292.683 V 165.854 H 282.927 Z M 321.951 156.098 H 331.707 V 165.854 H 321.951 Z M 341.463 156.098 H 351.22 V 165.854 H 341.463 Z M 351.22 156.098 H 360.976 V 165.854 H 351.22 Z M 48.78 165.854 H 58.537 V 175.61 H 48.78 Z M 58.537 165.854 H 68.293 V 175.61 H 58.537 Z M 68.293 165.854 H 78.049 V 175.61 H 68.293 Z M 87.805 165.854 H 97.561 V 175.61 H 87.805 Z M 107.317 165.854 H 117.073 V 175.61 H 107.317 Z M 117.073 165.854 H 126.829 V 175.61 H 117.073 Z M 165.854 165.854 H 175.61 V 175.61 H 165.854 Z M 175.61 165.854 H 185.366 V 175.61 H 175.61 Z M 234.146 165.854 H 243.902 V 175.61 H 234.146 Z M 243.902 165.854 H 253.659 V 175.61 H 243.902 Z M 263.415 165.854 H 273.171 V 175.61 H 263.415 Z M 273.171 165.854 H 282.927 V 175.61 H 273.171 Z M 302.439 165.854 H 312.195 V 175.61 H 302.439 Z M 321.951 165.854 H 331.707 V 175.61 H 321.951 Z M 331.707 165.854 H 341.463 V 175.61 H 331.707 Z M 341.463 165.854 H 351.22 V 175.61 H 341.463 Z M 39.024 175.61 H 48.78 V 185.366 H 39.024 Z M 58.537 175.61 H 68.293 V 185.366 H 58.537 Z M 78.049 175.61 H 87.805 V 185.366 H 78.049 Z M 97.561 175.61 H 107.317 V 185.366 H 97.561 Z M 117.073 175.61 H 126.829 V 185.366 H 117.073 Z M 136.585 175.61 H 146.341 V 185.366 H 136.585 Z M 146.341 175.61 H 156.098 V 185.366 H 146.341 Z M 156.098 175.61 H 165.854 V 185.366 H 156.098 Z M 214.634 175.61 H 224.39 V 185.366 H 214.634 Z M 224.39 175.61 H 234.146 V 185.366 H 224.39 Z M 234.146 175.61 H 243.902 V 185.366 H 234.146 Z M 243.902 175.61 H 253.659 V 185.366 H 243.902 Z M 273.171 175.61 H 282.927 V 185.366 H 273.171 Z M 292.683 175.61 H 302.439 V 185.366 H 292.683 Z M 321.951 175.61 H 331.707 V 185.366 H 321.951 Z M 39.024 185.366 H 48.78 V 195.122 H 39.024 Z M 68.293 185.366 H 78.049 V 195.122 H 68.293 Z M 78.049 185.366 H 87.805 V 195.122 H 78.049 Z M 87.805 185.366 H 97.561 V 195.122 H 87.805 Z M 107.317 185.366 H 117.073 V 195.122 H 107.317 Z M 126.829 185.366 H 136.585 V 195.122 H 126.829 Z M 185.366 185.366 H 195.122 V 195.122 H 185.366 Z M 243.902 185.366 H 253.659 V 195.122 H 243.902 Z M 282.927 185.366 H 292.683 V 195.122 H 282.927 Z M 292.683 185.366 H 302.439 V 195.122 H 292.683 Z M 302.439 185.366 H 312.195 V 195.122 H 302.439 Z M 321.951 185.366 H 331.707 V 195.122 H 321.951 Z M 331.707 185.366 H 341.463 V 195.122 H 331.707 Z M 58.537 195.122 H 68.293 V 204.878 H 58.537 Z M 68.293 195.122 H 78.049 V 204.878 H 68.293 Z M 78.049 195.122 H 87.805 V 204.878 H 78.049 Z M 87.805 195.122 H 97.561 V 204.878 H 87.805 Z M 97.561 195.122 H 107.317 V 204.878 H 97.561 Z M 117.073 195.122 H 126.829 V 204.878 H 117.073 Z M 126.829 195.122 H 136.585 V 204.878 H 126.829 Z M 165.854 195.122 H 175.61 V 204.878 H 165.854 Z M 195.122 195.122 H 204.878 V 204.878 H 195.122 Z M 214.634 195.122 H 224.39 V 204.878 H 214.634 Z M 234.146 195.122 H 243.902 V 204.878 H 234.146 Z M 243.902 195.122 H 253.659 V 204.878 H 243.902 Z M 253.659 195.122 H 263.415 V 204.878 H 253.659 Z M 263.415 195.122 H 273.171 V 204.878 H 263.415 Z M 282.927 195.122 H 292.683 V 204.878 H 282.927 Z M 292.683 195.122 H 302.439 V 204.878 H 292.683 Z M 312.195 195.122 H 321.951 V 204.878 H 312.195 Z M 321.951 195.122 H 331.707 V 204.878 H 321.951 Z M 331.707 195.122 H 341.463 V 204.878 H 331.707 Z M 58.537 204.878 H 68.293 V 214.634 H 58.537 Z M 78.049 204.878 H 87.805 V 214.634 H 78.049 Z M 87.805 204.878 H 97.561 V 214.634 H 87.805 Z M 136.585 204.878 H 146.341 V 214.634 H 136.585 Z M 156.098 204.878 H 165.854 V 214.634 H 156.098 Z M 165.854 204.878 H 175.61 V 214.634 H 165.854 Z M 175.61 204.878 H 185.366 V 214.634 H 175.61 Z M 185.366 204.878 H 195.122 V 214.634 H 185.366 Z M 224.39 204.878 H 234.146 V 214.634 H 224.39 Z M 234.146 204.878 H 243.902 V 214.634 H 234.146 Z M 253.659 204.878 H 263.415 V 214.634 H 253.659 Z M 263.415 204.878 H 273.171 V 214.634 H 263.415 Z M 273.171 204.878 H 282.927 V 214.634 H 273.171 Z M 282.927 204.878 H 292.683 V 214.634 H 282.927 Z M 292.683 204.878 H 302.439 V 214.634 H 292.683 Z M 312.195 204.878 H 321.951 V 214.634 H 312.195 Z M 321.951 204.878 H 331.707 V 214.634 H 321.951 Z M 341.463 204.878 H 351.22 V 214.634 H 341.463 Z M 351.22 204.878 H 360.976 V 214.634 H 351.22 Z M 39.024 214.634 H 48.78 V 224.39 H 39.024 Z M 48.78 214.634 H 58.537 V 224.39 H 48.78 Z M 68.293 214.634 H 78.049 V 224.39 H 68.293 Z M 78.049 214.634 H 87.805 V 224.39 H 78.049 Z M 87.805 214.634 H 97.561 V 224.39 H 87.805 Z M 97.561 214.634 H 107.317 V 224.39 H 97.561 Z M 117.073 214.634 H 126.829 V 224.39 H 117.073 Z M 156.098 214.634 H 165.854 V 224.39 H 156.098 Z M 185.366 214.634 H 195.122 V 224.39 H 185.366 Z M 214.634 214.634 H 224.39 V 224.39 H 214.634 Z M 234.146 214.634 H 243.902 V 224.39 H 234.146 Z M 273.171 214.634 H 282.927 V 224.39 H 273.171 Z M 302.439 214.634 H 312.195 V 224.39 H 302.439 Z M 312.195 214.634 H 321.951 V 224.39 H 312.195 Z M 331.707 214.634 H 341.463 V 224.39 H 331.707 Z M 341.463 214.634 H 351.22 V 224.39 H 341.463 Z M 48.78 224.39 H 58.537 V 234.146 H 48.78 Z M 68.293 224.39 H 78.049 V 234.146 H 68.293 Z M 87.805 224.39 H 97.561 V 234.146 H 87.805 Z M 117.073 224.39 H 126.829 V 234.146 H 117.073 Z M 126.829 224.39 H 136.585 V 234.146 H 126.829 Z M 146.341 224.39 H 156.098 V 234.146 H 146.341 Z M 156.098 224.39 H 165.854 V 234.146 H 156.098 Z M 175.61 224.39 H 185.366 V 234.146 H 175.61 Z M 195.122 224.39 H 204.878 V 234.146 H 195.122 Z M 204.878 224.39 H 214.634 V 234.146 H 204.878 Z M 214.634 224.39 H 224.39 V 234.146 H 214.634 Z M 224.39 224.39 H 234.146 V 234.146 H 224.39 Z M 263.415 224.39 H 273.171 V 234.146 H 263.415 Z M 273.171 224.39 H 282.927 V 234.146 H 273.171 Z M 282.927 224.39 H 292.683 V 234.146 H 282.927 Z M 312.195 224.39 H 321.951 V 234.146 H 312.195 Z M 341.463 224.39 H 351.22 V 234.146 H 341.463 Z M 58.537 234.146 H 68.293 V 243.902 H 58.537 Z M 78.049 234.146 H 87.805 V 243.902 H 78.049 Z M 97.561 234.146 H 107.317 V 243.902 H 97.561 Z M 107.317 234.146 H 117.073 V 243.902 H 107.317 Z M 117.073 234.146 H 126.829 V 243.902 H 117.073 Z M 136.585 234.146 H 146.341 V 243.902 H 136.585 Z M 156.098 234.146 H 165.854 V 243.902 H 156.098 Z M 195.122 234.146 H 204.878 V 243.902 H 195.122 Z M 253.659 234.146 H 263.415 V 243.902 H 253.659 Z M 302.439 234.146 H 312.195 V 243.902 H 302.439 Z M 321.951 234.146 H 331.707 V 243.902 H 321.951 Z M 331.707 234.146 H 341.463 V 243.902 H 331.707 Z M 351.22 234.146 H 360.976 V 243.902 H 351.22 Z M 39.024 243.902 H 48.78 V 253.659 H 39.024 Z M 78.049 243.902 H 87.805 V 253.659 H 78.049 Z M 87.805 243.902 H 97.561 V 253.659 H 87.805 Z M 117.073 243.902 H 126.829 V 253.659 H 117.073 Z M 126.829 243.902 H 136.585 V 253.659 H 126.829 Z M 136.585 243.902 H 146.341 V 253.659 H 136.585 Z M 146.341 243.902 H 156.098 V 253.659 H 146.341 Z M 156.098 243.902 H 165.854 V 253.659 H 156.098 Z M 175.61 243.902 H 185.366 V 253.659 H 175.61 Z M 185.366 243.902 H 195.122 V 253.659 H 185.366 Z M 195.122 243.902 H 204.878 V 253.659 H 195.122 Z M 234.146 243.902 H 243.902 V 253.659 H 234.146 Z M 243.902 243.902 H 253.659 V 253.659 H 243.902 Z M 263.415 243.902 H 273.171 V 253.659 H 263.415 Z M 292.683 243.902 H 302.439 V 253.659 H 292.683 Z M 321.951 243.902 H 331.707 V 253.659 H 321.951 Z M 331.707 243.902 H 341.463 V 253.659 H 331.707 Z M 351.22 243.902 H 360.976 V 253.659 H 351.22 Z M 87.805 253.659 H 97.561 V 263.415 H 87.805 Z M 97.561 253.659 H 107.317 V 263.415 H 97.561 Z M 107.317 253.659 H 117.073 V 263.415 H 107.317 Z M 117.073 253.659 H 126.829 V 263.415 H 117.073 Z M 136.585 253.659 H 146.341 V 263.415 H 136.585 Z M 156.098 253.659 H 165.854 V 263.415 H 156.098 Z M 185.366 253.659 H 195.122 V 263.415 H 185.366 Z M 204.878 253.659 H 214.634 V 263.415 H 204.878 Z M 224.39 253.659 H 234.146 V 263.415 H 224.39 Z M 234.146 253.659 H 243.902 V 263.415 H 234.146 Z M 243.902 253.659 H 253.659 V 263.415 H 243.902 Z M 263.415 253.659 H 273.171 V 263.415 H 263.415 Z M 282.927 253.659 H 292.683 V 263.415 H 282.927 Z M 292.683 253.659 H 302.439 V 263.415 H 292.683 Z M 302.439 253.659 H 312.195 V 263.415 H 302.439 Z M 321.951 253.659 H 331.707 V 263.415 H 321.951 Z M 341.463 253.659 H 351.22 V 263.415 H 341.463 Z M 351.22 253.659 H 360.976 V 263.415 H 351.22 Z M 48.78 263.415 H 58.537 V 273.171 H 48.78 Z M 58.537 263.415 H 68.293 V 273.171 H 58.537 Z M 68.293 263.415 H 78.049 V 273.171 H 68.293 Z M 78.049 263.415 H 87.805 V 273.171 H 78.049 Z M 87.805 263.415 H 97.561 V 273.171 H 87.805 Z M 107.317 263.415 H 117.073 V 273.171 H 107.317 Z M 117.073 263.415 H 126.829 V 273.171 H 117.073 Z M 126.829 263.415 H 136.585 V 273.171 H 126.829 Z M 136.585 263.415 H 146.341 V 273.171 H 136.585 Z M 146.341 263.415 H 156.098 V 273.171 H 146.341 Z M 156.098 263.415 H 165.854 V 273.171 H 156.098 Z M 165.854 263.415 H 175.61 V 273.171 H 165.854 Z M 185.366 263.415 H 195.122 V 273.171 H 185.366 Z M 214.634 263.415 H 224.39 V 273.171 H 214.634 Z M 234.146 263.415 H 243.902 V 273.171 H 234.146 Z M 273.171 263.415 H 282.927 V 273.171 H 273.171 Z M 292.683 263.415 H 302.439 V 273.171 H 292.683 Z M 312.195 263.415 H 321.951 V 273.171 H 312.195 Z M 321.951 263.415 H 331.707 V 273.171 H 321.951 Z M 351.22 263.415 H 360.976 V 273.171 H 351.22 Z M 39.024 273.171 H 48.78 V 282.927 H 39.024 Z M 68.293 273.171 H 78.049 V 282.927 H 68.293 Z M 78.049 273.171 H 87.805 V 282.927 H 78.049 Z M 97.561 273.171 H 107.317 V 282.927 H 97.561 Z M 117.073 273.171 H 126.829 V 282.927 H 117.073 Z M 136.585 273.171 H 146.341 V 282.927 H 136.585 Z M 146.341 273.171 H 156.098 V 282.927 H 146.341 Z M 156.098 273.171 H 165.854 V 282.927 H 156.098 Z M 165.854 273.171 H 175.61 V 282.927 H 165.854 Z M 175.61 273.171 H 185.366 V 282.927 H 175.61 Z M 195.122 273.171 H 204.878 V 282.927 H 195.122 Z M 204.878 273.171 H 214.634 V 282.927 H 204.878 Z M 224.39 273.171 H 234.146 V 282.927 H 224.39 Z M 253.659 273.171 H 263.415 V 282.927 H 253.659 Z M 273.171 273.171 H 282.927 V 282.927 H 273.171 Z M 282.927 273.171 H 292.683 V 282.927 H 282.927 Z M 292.683 273.171 H 302.439 V 282.927 H 292.683 Z M 302.439 273.171 H 312.195 V 282.927 H 302.439 Z M 312.195 273.171 H 321.951 V 282.927 H 312.195 Z M 321.951 273.171 H 331.707 V 282.927 H 321.951 Z M 331.707 273.171 H 341.463 V 282.927 H 331.707 Z M 341.463 273.171 H 351.22 V 282.927 H 341.463 Z M 351.22 273.171 H 360.976 V 282.927 H 351.22 Z M 117.073 282.927 H 126.829 V 292.683 H 117.073 Z M 126.829 282.927 H 136.585 V 292.683 H 126.829 Z M 136.585 282.927 H 146.341 V 292.683 H 136.585 Z M 156.098 282.927 H 165.854 V 292.683 H 156.098 Z M 175.61 282.927 H 185.366 V 292.683 H 175.61 Z M 185.366 282.927 H 195.122 V 292.683 H 185.366 Z M 195.122 282.927 H 204.878 V 292.683 H 195.122 Z M 224.39 282.927 H 234.146 V 292.683 H 224.39 Z M 234.146 282.927 H 243.902 V 292.683 H 234.146 Z M 243.902 282.927 H 253.659 V 292.683 H 243.902 Z M 273.171 282.927 H 282.927 V 292.683 H 273.171 Z M 312.195 282.927 H 321.951 V 292.683 H 312.195 Z M 321.951 282.927 H 331.707 V 292.683 H 321.951 Z M 117.073 292.683 H 126.829 V 302.439 H 117.073 Z M 146.341 292.683 H 156.098 V 302.439 H 146.341 Z M 156.098 292.683 H 165.854 V 302.439 H 156.098 Z M 165.854 292.683 H 175.61 V 302.439 H 165.854 Z M 175.61 292.683 H 185.366 V 302.439 H 175.61 Z M 204.878 292.683 H 214.634 V 302.439 H 204.878 Z M 214.634 292.683 H 224.39 V 302.439 H 214.634 Z M 224.39 292.683 H 234.146 V 302.439 H 224.39 Z M 234.146 292.683 H 243.902 V 302.439 H 234.146 Z M 243.902 292.683 H 253.659 V 302.439 H 243.902 Z M 263.415 292.683 H 273.171 V 302.439 H 263.415 Z M 273.171 292.683 H 282.927 V 302.439 H 273.171 Z M 292.683 292.683 H 302.439 V 302.439 H 292.683 Z M 312.195 292.683 H 321.951 V 302.439 H 312.195 Z M 341.463 292.683 H 351.22 V 302.439 H 341.463 Z M 117.073 302.439 H 126.829 V 312.195 H 117.073 Z M 126.829 302.439 H 136.585 V 312.195 H 126.829 Z M 146.341 302.439 H 156.098 V 312.195 H 146.341 Z M 156.098 302.439 H 165.854 V 312.195 H 156.098 Z M 204.878 302.439 H 214.634 V 312.195 H 204.878 Z M 214.634 302.439 H 224.39 V 312.195 H 214.634 Z M 234.146 302.439 H 243.902 V 312.195 H 234.146 Z M 263.415 302.439 H 273.171 V 312.195 H 263.415 Z M 273.171 302.439 H 282.927 V 312.195 H 273.171 Z M 312.195 302.439 H 321.951 V 312.195 H 312.195 Z M 321.951 302.439 H 331.707 V 312.195 H 321.951 Z M 331.707 302.439 H 341.463 V 312.195 H 331.707 Z M 341.463 302.439 H 351.22 V 312.195 H 341.463 Z M 351.22 302.439 H 360.976 V 312.195 H 351.22 Z M 136.585 312.195 H 146.341 V 321.951 H 136.585 Z M 146.341 312.195 H 156.098 V 321.951 H 146.341 Z M 156.098 312.195 H 165.854 V 321.951 H 156.098 Z M 165.854 312.195 H 175.61 V 321.951 H 165.854 Z M 195.122 312.195 H 204.878 V 321.951 H 195.122 Z M 204.878 312.195 H 214.634 V 321.951 H 204.878 Z M 214.634 312.195 H 224.39 V 321.951 H 214.634 Z M 224.39 312.195 H 234.146 V 321.951 H 224.39 Z M 253.659 312.195 H 263.415 V 321.951 H 253.659 Z M 263.415 312.195 H 273.171 V 321.951 H 263.415 Z M 273.171 312.195 H 282.927 V 321.951 H 273.171 Z M 282.927 312.195 H 292.683 V 321.951 H 282.927 Z M 292.683 312.195 H 302.439 V 321.951 H 292.683 Z M 302.439 312.195 H 312.195 V 321.951 H 302.439 Z M 312.195 312.195 H 321.951 V 321.951 H 312.195 Z M 331.707 312.195 H 341.463 V 321.951 H 331.707 Z M 341.463 312.195 H 351.22 V 321.951 H 341.463 Z M 117.073 321.951 H 126.829 V 331.707 H 117.073 Z M 126.829 321.951 H 136.585 V 331.707 H 126.829 Z M 195.122 321.951 H 204.878 V 331.707 H 195.122 Z M 204.878 321.951 H 214.634 V 331.707 H 204.878 Z M 224.39 321.951 H 234.146 V 331.707 H 224.39 Z M 243.902 321.951 H 253.659 V 331.707 H 243.902 Z M 253.659 321.951 H 263.415 V 331.707 H 253.659 Z M 263.415 321.951 H 273.171 V 331.707 H 263.415 Z M 302.439 321.951 H 312.195 V 331.707 H 302.439 Z M 321.951 321.951 H 331.707 V 331.707 H 321.951 Z M 331.707 321.951 H 341.463 V 331.707 H 331.707 Z M 341.463 321.951 H 351.22 V 331.707 H 341.463 Z M 351.22 321.951 H 360.976 V 331.707 H 351.22 Z M 117.073 331.707 H 126.829 V 341.463 H 117.073 Z M 126.829 331.707 H 136.585 V 341.463 H 126.829 Z M 136.585 331.707 H 146.341 V 341.463 H 136.585 Z M 156.098 331.707 H 165.854 V 341.463 H 156.098 Z M 165.854 331.707 H 175.61 V 341.463 H 165.854 Z M 185.366 331.707 H 195.122 V 341.463 H 185.366 Z M 195.122 331.707 H 204.878 V 341.463 H 195.122 Z M 204.878 331.707 H 214.634 V 341.463 H 204.878 Z M 234.146 331.707 H 243.902 V 341.463 H 234.146 Z M 253.659 331.707 H 263.415 V 341.463 H 253.659 Z M 292.683 331.707 H 302.439 V 341.463 H 292.683 Z M 302.439 331.707 H 312.195 V 341.463 H 302.439 Z M 321.951 331.707 H 331.707 V 341.463 H 321.951 Z M 126.829 341.463 H 136.585 V 351.22 H 126.829 Z M 136.585 341.463 H 146.341 V 351.22 H 136.585 Z M 204.878 341.463 H 214.634 V 351.22 H 204.878 Z M 234.146 341.463 H 243.902 V 351.22 H 234.146 Z M 253.659 341.463 H 263.415 V 351.22 H 253.659 Z M 263.415 341.463 H 273.171 V 351.22 H 263.415 Z M 273.171 341.463 H 282.927 V 351.22 H 273.171 Z M 282.927 341.463 H 292.683 V 351.22 H 282.927 Z M 302.439 341.463 H 312.195 V 351.22 H 302.439 Z M 312.195 341.463 H 321.951 V 351.22 H 312.195 Z M 351.22 341.463 H 360.976 V 351.22 H 351.22 Z M 117.073 351.22 H 126.829 V 360.976 H 117.073 Z M 126.829 351.22 H 136.585 V 360.976 H 126.829 Z M 146.341 351.22 H 156.098 V 360.976 H 146.341 Z M 214.634 351.22 H 224.39 V 360.976 H 214.634 Z M 224.39 351.22 H 234.146 V 360.976 H 224.39 Z M 243.902 351.22 H 253.659 V 360.976 H 243.902 Z M 263.415 351.22 H 273.171 V 360.976 H 263.415 Z M 292.683 351.22 H 302.439 V 360.976 H 292.683 Z M 312.195 351.22 H 321.951 V 360.976 H 312.195 Z M 321.951 351.22 H 331.707 V 360.976 H 321.951 Z M 331.707 351.22 H 341.463 V 360.976 H 331.707 Z" fill="#000000" stroke="none" stroke-width="1"/><path d="M 39.024 39.024 H 107.317 V 107.317 H 39.024 Z M 48.78 48.78 H 97.561 V 97.561 H 48.78 Z" fill="#000000" stroke="none" stroke-width="1" fill-rule="evenodd"/><rect x="58.537" y="58.537" width="29.268" height="29.268" fill="#000000" stroke="none" stroke-width="1"/><path d="M 292.683 39.024 H 360.976 V 107.317 H 292.683 Z M 302.439 48.78 H 351.22 V 97.561 H 302.439 Z" fill="#000000" stroke="none" stroke-width="1" fill-rule="evenodd"/><rect x="312.195" y="58.537" width="29.268" height="29.268" fill="#000000" stroke="none" stroke-width="1"/><path d="M 39.024 292.683 H 107.317 V 360.976 H 39.024 Z M 48.78 302.439 H 97.561 V 351.22 H 48.78 Z" fill="#000000" stroke="none" stroke-width="1" fill-rule="evenodd"/><rect x="58.537" y="312.195" width="29.268" height="29.268" fill="#000000" stroke="none" stroke-width="1"/></svg>
@CONFIG( version -> "1.0.0" )
@DATA(
scene = { width = 400, height = 240, background = #0a0f1e }
duration = 1.2
loop_mode = "ping_pong"
elements::
{ type = "rect", id = "wobble_box", x = 40, y = 40, width = 50, height = 50,
style = { fill = #f5a623, stroke = "none", stroke_width = 0, opacity = 1.0 } }
{ type = "circle", id = "orbit_dot", cx = 200, cy = 170, r = 26,
style = { fill = #4a9eff, stroke = #e2e8f0, stroke_width = 2.0, opacity = 1.0 } }
animations::
{ target_id = "wobble_box", property = "rotate",
keyframes = [ { time = 0.0, value = 0.0 },
{ time = 1.2, value = 30.0, easing = "ease_in_out" } ] }
{ target_id = "orbit_dot", property = "translate_x",
keyframes = [ { time = 0.0, value = -140.0 },
{ time = 1.2, value = 140.0, easing = "ease_in_out" } ] }
{ target_id = "orbit_dot", property = "scale_x",
keyframes = [ { time = 0.0, value = 1.0 },
{ time = 0.6, value = 1.4, easing = "ease_out" },
{ time = 1.2, value = 1.0, easing = "ease_in" } ] }
{ target_id = "orbit_dot", property = "scale_y",
keyframes = [ { time = 0.0, value = 1.0 },
{ time = 0.6, value = 1.4, easing = "ease_out" },
{ time = 1.2, value = 1.0, easing = "ease_in" } ] }
{ target_id = "orbit_dot", property = "opacity",
keyframes = [ { time = 0.0, value = 1.0 },
{ time = 1.2, value = 0.55, easing = "ease_in_out" } ] }
)
<svg xmlns="http://www.w3.org/2000/svg" width="400" height="240" viewBox="0 0 400 240"><rect width="400" height="240" fill="#0a0f1e"/><rect x="40" y="40" width="50" height="50" id="wobble_box" fill="#f5a623" stroke="none" stroke-width="0"/><circle cx="200" cy="170" r="26" id="orbit_dot" fill="#4a9eff" stroke="#e2e8f0" stroke-width="2"/></svg>
@CONFIG( version -> "1.0.0" )
@QUICKFUNCS(
~badge<object>(x, y, label, color) {
return {
type = "group"
elements = [
{ type = "rect", x = x, y = y, width = 100, height = 32, rx = 16,
style = { fill = color, stroke = "none", stroke_width = 0, opacity = 1.0 } },
{ type = "text", x = x + 50, y = y + 21, content = label,
style = { fill = #ffffff, font_size = 13, text_anchor = "middle",
font_weight = "bold", stroke = "none", stroke_width = 0, opacity = 1.0 } }
]
}
}
~dot<object>(cx, cy, r, color) {
return {
type = "circle"
cx = cx cy = cy r = r
style = { fill = color, stroke = #1a1a2e, stroke_width = 2.0, opacity = 0.9 }
}
}
)
@DATA(
scene = { width = 700, height = 420, background = #f4f5f7 }
elements::
badge(20, 20, "primary", #007bff)
badge(140, 20, "success", #28a745)
badge(260, 20, "warning", #ffc107)
badge(380, 20, "danger", #dc3545)
badge(500, 20, "dark", #343a40)
dot(80, 200, 55, #e94560)
dot(210, 200, 45, #533483)
dot(330, 200, 60, #0f3460)
dot(460, 200, 40, #4a9eff)
dot(580, 200, 50, #22c55e)
{ type = "text", x = 350, y = 390, content = "MSX Parametric Components",
style = { fill = #333333, font_size = 16, text_anchor = "middle",
stroke = "none", stroke_width = 0, opacity = 1.0 } }
)
<svg xmlns="http://www.w3.org/2000/svg" width="700" height="420" viewBox="0 0 700 420"><rect width="700" height="420" fill="#f4f5f7"/><g><rect x="20" y="20" width="100" height="32" rx="16" fill="#007bff" stroke="none" stroke-width="0"/><text x="70" y="41" fill="#ffffff" stroke="none" stroke-width="0" font-size="13" font-weight="bold" text-anchor="middle">primary</text></g><g><rect x="140" y="20" width="100" height="32" rx="16" fill="#28a745" stroke="none" stroke-width="0"/><text x="190" y="41" fill="#ffffff" stroke="none" stroke-width="0" font-size="13" font-weight="bold" text-anchor="middle">success</text></g><g><rect x="260" y="20" width="100" height="32" rx="16" fill="#ffc107" stroke="none" stroke-width="0"/><text x="310" y="41" fill="#ffffff" stroke="none" stroke-width="0" font-size="13" font-weight="bold" text-anchor="middle">warning</text></g><g><rect x="380" y="20" width="100" height="32" rx="16" fill="#dc3545" stroke="none" stroke-width="0"/><text x="430" y="41" fill="#ffffff" stroke="none" stroke-width="0" font-size="13" font-weight="bold" text-anchor="middle">danger</text></g><g><rect x="500" y="20" width="100" height="32" rx="16" fill="#343a40" stroke="none" stroke-width="0"/><text x="550" y="41" fill="#ffffff" stroke="none" stroke-width="0" font-size="13" font-weight="bold" text-anchor="middle">dark</text></g><circle cx="80" cy="200" r="55" fill="#e94560" stroke="#1a1a2e" stroke-width="2" opacity="0.9"/><circle cx="210" cy="200" r="45" fill="#533483" stroke="#1a1a2e" stroke-width="2" opacity="0.9"/><circle cx="330" cy="200" r="60" fill="#0f3460" stroke="#1a1a2e" stroke-width="2" opacity="0.9"/><circle cx="460" cy="200" r="40" fill="#4a9eff" stroke="#1a1a2e" stroke-width="2" opacity="0.9"/><circle cx="580" cy="200" r="50" fill="#22c55e" stroke="#1a1a2e" stroke-width="2" opacity="0.9"/><text x="350" y="390" fill="#333333" stroke="none" stroke-width="0" font-size="16" text-anchor="middle">MSX Parametric Components</text></svg>
@CONFIG( version -> "1.0.0" )
@DATA(
scene = { width = 500, height = 500, background = #0d1117 }
elements::
{ type = "path", d = "M 250 50 L 450 430 L 50 430 Z",
style = { fill = #3498db, stroke = #2980b9, stroke_width = 3.0, opacity = 0.85 } }
{ type = "path",
d = "M 250 120 C 340 60 440 140 420 240 C 400 340 300 420 210 390 C 120 360 80 260 100 180 C 120 100 160 180 250 120 Z",
style = { fill = "none", stroke = #e74c3c, stroke_width = 4.0, opacity = 1.0 } }
{ type = "path", d = "M 80 350 A 130 130 0 0 1 420 350",
style = { fill = "none", stroke = #f5a623, stroke_width = 5.0, opacity = 1.0 } }
{ type = "circle", cx = 250, cy = 250, r = 8,
style = { fill = #ffffff, stroke = "none", stroke_width = 0, opacity = 1.0 } }
)
<svg xmlns="http://www.w3.org/2000/svg" width="500" height="500" viewBox="0 0 500 500"><rect width="500" height="500" fill="#0d1117"/><path d="M 250 50 L 450 430 L 50 430 Z" fill="#3498db" stroke="#2980b9" stroke-width="3" opacity="0.85"/><path d="M 250 120 C 340 60 440 140 420 240 C 400 340 300 420 210 390 C 120 360 80 260 100 180 C 120 100 160 180 250 120 Z" fill="none" stroke="#e74c3c" stroke-width="4"/><path d="M 80 350 A 130 130 0 0 1 420 350" fill="none" stroke="#f5a623" stroke-width="5"/><circle cx="250" cy="250" r="8" fill="#ffffff" stroke="none" stroke-width="0"/></svg>
// examples/sdf_logo.msx
// MSX logotype concept — the letters "M", "S", "X" built from SDF
// primitives and boolean operations, with splat glow as lighting.
@CONFIG( version -> "1.0.0" )
@DATA(
scene = { width = 600, height = 300, background = #06060f }
elements::
// ── Background glow ───────────────────────────────────────────────
{ type = "splat", x = 300, y = 150, sigma_x = 220, sigma_y = 100,
color = #1a0040, opacity = 0.85 }
{ type = "splat", x = 110, y = 150, sigma_x = 80, sigma_y = 60,
color = #4a9eff, opacity = 0.25 }
{ type = "splat", x = 300, y = 150, sigma_x = 70, sigma_y = 55,
color = #a78bfa, opacity = 0.25 }
{ type = "splat", x = 490, y = 150, sigma_x = 80, sigma_y = 60,
color = #e94560, opacity = 0.25 }
// ── "M" ───────────────────────────────────────────────────────────
{ type = "sdf", fill = #4a9eff,
transform = { type = "translate", x = 110, y = 150 },
tree = { type = "smooth_subtract", k = 0.1,
a = { type = "smooth_union", k = 0.2,
children = [
{ type = "box", x = -45, y = -70, width = 28, height = 140, corner_radius = 8 },
{ type = "box", x = 17, y = -70, width = 28, height = 140, corner_radius = 8 },
{ type = "box", x = -20, y = -70, width = 40, height = 36, corner_radius = 6 }
] },
b = { type = "box", x = -12, y = -30, width = 24, height = 60, corner_radius = 4 } } }
{ type = "splat", x = 110, y = 150, sigma_x = 38, sigma_y = 30,
color = #7ec8ff, opacity = 0.45 }
// ── "S" ───────────────────────────────────────────────────────────
{ type = "sdf", fill = #a78bfa,
transform = { type = "translate", x = 300, y = 150 },
tree = { type = "smooth_union", k = 0.18,
children = [
{ type = "smooth_subtract", k = 0.12,
a = { type = "circle", cx = 12, cy = -34, r = 36 },
b = { type = "circle", cx = 12, cy = -34, r = 22 } },
{ type = "smooth_subtract", k = 0.12,
a = { type = "circle", cx = -12, cy = 34, r = 36 },
b = { type = "circle", cx = -12, cy = 34, r = 22 } },
{ type = "box", x = -8, y = -12, width = 16, height = 24, corner_radius = 4 }
] } }
{ type = "splat", x = 300, y = 150, sigma_x = 38, sigma_y = 30,
color = #c4b5fd, opacity = 0.45 }
// ── "X" ───────────────────────────────────────────────────────────
{ type = "sdf", fill = #e94560,
transform = { type = "translate", x = 490, y = 150 },
tree = { type = "smooth_union", k = 0.15,
children = [
{ type = "line", x1 = -42, y1 = -66, x2 = 42, y2 = 66, thickness = 22 },
{ type = "line", x1 = 42, y1 = -66, x2 = -42, y2 = 66, thickness = 22 }
] } }
{ type = "splat", x = 490, y = 150, sigma_x = 38, sigma_y = 30,
color = #ff8fa3, opacity = 0.45 }
// ── Core highlights ───────────────────────────────────────────────
{ type = "splat", x = 110, y = 135, sigma_x = 12, sigma_y = 10,
color = #ffffff, opacity = 0.6 }
{ type = "splat", x = 300, y = 130, sigma_x = 12, sigma_y = 10,
color = #ffffff, opacity = 0.6 }
{ type = "splat", x = 490, y = 148, sigma_x = 12, sigma_y = 10,
color = #ffffff, opacity = 0.6 }
)
<svg xmlns="http://www.w3.org/2000/svg" width="600" height="300" viewBox="0 0 600 300"><rect width="600" height="300" fill="#06060f"/><defs><radialGradient id="splat-grad-1" cx="0.5" cy="0.5" r="0.5"><stop offset="0%" stop-color="#1a0040" stop-opacity="0.85"/><stop offset="55%" stop-color="#1a0040" stop-opacity="0.2975"/><stop offset="100%" stop-color="#1a0040" stop-opacity="0"/></radialGradient><radialGradient id="splat-grad-2" cx="0.5" cy="0.5" r="0.5"><stop offset="0%" stop-color="#4a9eff" stop-opacity="0.25"/><stop offset="55%" stop-color="#4a9eff" stop-opacity="0.0875"/><stop offset="100%" stop-color="#4a9eff" stop-opacity="0"/></radialGradient><radialGradient id="splat-grad-3" cx="0.5" cy="0.5" r="0.5"><stop offset="0%" stop-color="#a78bfa" stop-opacity="0.25"/><stop offset="55%" stop-color="#a78bfa" stop-opacity="0.0875"/><stop offset="100%" stop-color="#a78bfa" stop-opacity="0"/></radialGradient><radialGradient id="splat-grad-4" cx="0.5" cy="0.5" r="0.5"><stop offset="0%" stop-color="#e94560" stop-opacity="0.25"/><stop offset="55%" stop-color="#e94560" stop-opacity="0.0875"/><stop offset="100%" stop-color="#e94560" stop-opacity="0"/></radialGradient><radialGradient id="splat-grad-5" cx="0.5" cy="0.5" r="0.5"><stop offset="0%" stop-color="#7ec8ff" stop-opacity="0.45"/><stop offset="55%" stop-color="#7ec8ff" stop-opacity="0.1575"/><stop offset="100%" stop-color="#7ec8ff" stop-opacity="0"/></radialGradient><radialGradient id="splat-grad-6" cx="0.5" cy="0.5" r="0.5"><stop offset="0%" stop-color="#c4b5fd" stop-opacity="0.45"/><stop offset="55%" stop-color="#c4b5fd" stop-opacity="0.1575"/><stop offset="100%" stop-color="#c4b5fd" stop-opacity="0"/></radialGradient><radialGradient id="splat-grad-7" cx="0.5" cy="0.5" r="0.5"><stop offset="0%" stop-color="#ff8fa3" stop-opacity="0.45"/><stop offset="55%" stop-color="#ff8fa3" stop-opacity="0.1575"/><stop offset="100%" stop-color="#ff8fa3" stop-opacity="0"/></radialGradient><radialGradient id="splat-grad-8" cx="0.5" cy="0.5" r="0.5"><stop offset="0%" stop-color="#ffffff" stop-opacity="0.6"/><stop offset="55%" stop-color="#ffffff" stop-opacity="0.21"/><stop offset="100%" stop-color="#ffffff" stop-opacity="0"/></radialGradient><radialGradient id="splat-grad-9" cx="0.5" cy="0.5" r="0.5"><stop offset="0%" stop-color="#ffffff" stop-opacity="0.6"/><stop offset="55%" stop-color="#ffffff" stop-opacity="0.21"/><stop offset="100%" stop-color="#ffffff" stop-opacity="0"/></radialGradient><radialGradient id="splat-grad-10" cx="0.5" cy="0.5" r="0.5"><stop offset="0%" stop-color="#ffffff" stop-opacity="0.6"/><stop offset="55%" stop-color="#ffffff" stop-opacity="0.21"/><stop offset="100%" stop-color="#ffffff" stop-opacity="0"/></radialGradient></defs><ellipse cx="300" cy="150" rx="528" ry="240" fill="url(#splat-grad-1)"/><ellipse cx="110" cy="150" rx="192" ry="144" fill="url(#splat-grad-2)"/><ellipse cx="300" cy="150" rx="168" ry="132" fill="url(#splat-grad-3)"/><ellipse cx="490" cy="150" rx="192" ry="144" fill="url(#splat-grad-4)"/><!-- sdf node 'smooth_subtract': use msx-render-cpu/msx-render-gpu for native support --><ellipse cx="110" cy="150" rx="91.2" ry="72" fill="url(#splat-grad-5)"/><!-- sdf node 'smooth_union': use msx-render-cpu/msx-render-gpu for native support --><ellipse cx="300" cy="150" rx="91.2" ry="72" fill="url(#splat-grad-6)"/><!-- sdf node 'smooth_union': use msx-render-cpu/msx-render-gpu for native support --><ellipse cx="490" cy="150" rx="91.2" ry="72" fill="url(#splat-grad-7)"/><ellipse cx="110" cy="135" rx="28.8" ry="24" fill="url(#splat-grad-8)"/><ellipse cx="300" cy="130" rx="28.8" ry="24" fill="url(#splat-grad-9)"/><ellipse cx="490" cy="148" rx="28.8" ry="24" fill="url(#splat-grad-10)"/></svg>
// examples/sdf_shader_fill.msx
// Tests SdfNode's real shader-fill path (sdf_shader.rs's mask+color+
// composite technique) — the actual point of this session's earlier GPU
// work: a shader masked to the node's TRUE antialiased silhouette, not
// its rectangular bounding box.
//
// Reuses shaders/checkerboard.wgsl on purpose, same reasoning as
// splat_shader_fill.msx: it's the sharpest possible diagnostic for
// masking correctness. A smooth_union "blob" (not a plain circle, not
// anything remotely rectangular) filled with a hard-edged checkerboard
// makes any masking bug immediately obvious — squares bleeding into the
// blob's concave notch or past its rounded silhouette would be
// impossible to miss, where a soft shader like plasma might hide the
// same bug.
//
// The stroke on the shader-filled blob tests SdfPipeline::draw_stroke_only
// specifically — shader routing only ever handles the FILL (see
// sdf_shader.rs's own "known gaps"), so the stroke has to still show up,
// drawn separately, flat-colored, on top of the real WGSL fill
// underneath it.
//
// Rendering status, same caveat as every shader-def example in this repo:
// only `msx rasterize-gpu`/`animate-gpu` (msx-render-gpu, built with
// --features gpu) execute this WGSL and apply the real antialiased mask.
// `msx rasterize` (CPU) and `msx render` (SVG) both resolve the fill to
// checkerboard's own `fallback_color` and paint it flat within the SDF
// shape's own (CPU/SVG-rendered) silhouette — which, unlike the GPU
// bounding-box-then-mask technique, was already correct for arbitrary SDF
// shapes on those two renderers before this session even started; only
// GPU needed the new masking work.
@CONFIG( version -> "1.0.0" )
@DATA(
scene = { width = 300, height = 200, background = #14141c }
defs::
{ type = "shader", id = "checker_1", source_ref = "shaders/checkerboard.wgsl",
entry_point = "fs_main", fallback_color = #3a3a4a,
uniforms = [ { name = "cells", type = "float", value = 14.0 },
{ name = "resolution", type = "vec2", value = [300.0, 200.0] },
{ name = "color_a", type = "vec3", value = [0.9, 0.9, 0.95] },
{ name = "color_b", type = "vec3", value = [0.16, 0.16, 0.22] } ] }
elements::
// Plain flat-color blob on the left — same tree shape as the
// shader-filled one on the right, for a direct before/after
// comparison of the exact same silhouette.
{ type = "sdf", fill = #4a9eff,
transform = { type = "translate", x = 85, y = 100 },
tree = { type = "smooth_union", k = 0.35,
children = [ { type = "circle", cx = -22, cy = 0, r = 38 },
{ type = "circle", cx = 22, cy = -10, r = 30 } ] } }
// Shader-filled blob, WITH a stroke — exercises both the mask+color+
// composite fill path and draw_stroke_only in the same node.
{ type = "sdf", fill = "url(#checker_1)", stroke = #ffffff, stroke_width = 3,
transform = { type = "translate", x = 205, y = 100 },
tree = { type = "smooth_union", k = 0.35,
children = [ { type = "circle", cx = -22, cy = 0, r = 38 },
{ type = "circle", cx = 22, cy = -10, r = 30 } ] } }
)
<svg xmlns="http://www.w3.org/2000/svg" width="300" height="200" viewBox="0 0 300 200"><rect width="300" height="200" fill="#14141c"/><defs><!-- shader 'checker_1': WGSL has no SVG equivalent, renders as none in SVG export (native raster paths use fallback_color #3a3a4a instead) --></defs><!-- sdf node 'smooth_union': use msx-render-cpu/msx-render-gpu for native support --><!-- sdf node 'smooth_union': use msx-render-cpu/msx-render-gpu for native support --></svg>
// examples/sdf_shapes.msx
// SDF primitives and boolean operations.
// What makes these special vs SVG shapes: k > 0 on smooth_union/subtract
// means the boundary between shapes blends like wet clay being pushed
// together — no hard seam, no aliasing, mathematically exact at any
// resolution. The k value controls how far the blend extends: 0.0 is
// identical to a hard boolean, 0.5 is aggressive clay-blending.
@CONFIG( version -> "1.0.0" )
@DATA(
scene = { width = 600, height = 400, background = #0d0d1a }
elements::
// Row 1 — primitives
// Circle
{ type = "sdf", fill = #4a9eff,
transform = { type = "translate", x = 75, y = 100 },
tree = { type = "circle", cx = 0, cy = 0, r = 55 } }
// Box with round corners
{ type = "sdf", fill = #22c55e,
transform = { type = "translate", x = 225, y = 100 },
tree = { type = "box", x = -55, y = -45, width = 110, height = 90, corner_radius = 18 } }
// Ring
{ type = "sdf", fill = #f5a623,
transform = { type = "translate", x = 375, y = 100 },
tree = { type = "ring", cx = 0, cy = 0, r = 48, thickness = 16 } }
// Arc
{ type = "sdf", fill = #a78bfa,
transform = { type = "translate", x = 525, y = 100 },
tree = { type = "arc", cx = 0, cy = 0, r = 48,
angle_start = -2.094, angle_end = 2.094, thickness = 14 } }
// Row 2 — boolean operations
// Hard union (k=0): two circles touching, sharp join
{ type = "sdf", fill = #e94560,
transform = { type = "translate", x = 75, y = 280 },
tree = { type = "union",
children = [ { type = "circle", cx = -22, cy = 0, r = 38 },
{ type = "circle", cx = 22, cy = 0, r = 38 } ] } }
// Smooth union (k=0.3): same two circles, blended like clay
{ type = "sdf", fill = #ff6b6b,
transform = { type = "translate", x = 225, y = 280 },
tree = { type = "smooth_union", k = 0.3,
children = [ { type = "circle", cx = -22, cy = 0, r = 38 },
{ type = "circle", cx = 22, cy = 0, r = 38 } ] } }
// Smooth subtract (k=0.25): circle with a soft notch carved out
{ type = "sdf", fill = #ffd166,
transform = { type = "translate", x = 375, y = 280 },
tree = { type = "smooth_subtract", k = 0.25,
a = { type = "circle", cx = 0, cy = 0, r = 52 },
b = { type = "circle", cx = 22, cy = -18, r = 36 } } }
// Smooth intersect + offset: inflated intersect ring
{ type = "sdf", fill = #06d6a0,
transform = { type = "translate", x = 525, y = 280 },
tree = { type = "offset", amount = 8,
child = { type = "smooth_intersect", k = 0.15,
a = { type = "circle", cx = -16, cy = 0, r = 52 },
b = { type = "circle", cx = 16, cy = 0, r = 52 } } } }
)
<svg xmlns="http://www.w3.org/2000/svg" width="600" height="400" viewBox="0 0 600 400"><rect width="600" height="400" fill="#0d0d1a"/><!-- sdf node 'circle': use msx-render-cpu/msx-render-gpu for native support --><!-- sdf node 'box': use msx-render-cpu/msx-render-gpu for native support --><!-- sdf node 'ring': use msx-render-cpu/msx-render-gpu for native support --><!-- sdf node 'arc': use msx-render-cpu/msx-render-gpu for native support --><!-- sdf node 'union': use msx-render-cpu/msx-render-gpu for native support --><!-- sdf node 'smooth_union': use msx-render-cpu/msx-render-gpu for native support --><!-- sdf node 'smooth_subtract': use msx-render-cpu/msx-render-gpu for native support --><!-- sdf node 'offset': use msx-render-cpu/msx-render-gpu for native support --></svg>
// examples/sdf_splat_mixed.msx
// Hard vector shapes + SDF booleans + Gaussian splat atmosphere.
// This is the actual MSX value proposition: all three mark types
// compositing together in one scene. The splats provide the soft glow
// that makes the hard shapes read as lit from within — something you
// can't approximate cleanly in SVG because SVG filters operate per-element
// and can't reach across element boundaries the way alpha accumulation does.
@CONFIG( version -> "1.0.0" )
@QUICKFUNCS(
~glow<object>(x, y, color, radius, strength) {
return { type = "splat", x = x, y = y,
sigma_x = radius, sigma_y = radius,
color = color, opacity = strength }
}
)
@DATA(
scene = { width = 600, height = 400, background = #080810 }
elements::
// ── Background atmosphere (splats, drawn first = furthest back) ──
glow(300, 200, #1a0533, 180, 0.8)
glow(180, 160, #0f1a40, 120, 0.6)
glow(420, 240, #001a20, 110, 0.6)
// ── Hard vector shapes ────────────────────────────────────────────
{ type = "rect", x = 40, y = 140, width = 140, height = 120, rx = 8,
style = { fill = #0f3460, stroke = #4a9eff, stroke_width = 1.5, opacity = 0.9 } }
{ type = "circle", cx = 300, cy = 200, r = 70,
style = { fill = #1a0533, stroke = #a78bfa, stroke_width = 2.0, opacity = 0.85 } }
{ type = "rect", x = 420, y = 140, width = 140, height = 120, rx = 8,
style = { fill = #001a20, stroke = #22c55e, stroke_width = 1.5, opacity = 0.9 } }
// ── SDF shapes (mid layer) ────────────────────────────────────────
{ type = "sdf", fill = #e94560,
transform = { type = "translate", x = 300, y = 200 },
tree = { type = "smooth_union", k = 0.35,
children = [ { type = "circle", cx = -24, cy = 0, r = 32 },
{ type = "circle", cx = 24, cy = 0, r = 32 },
{ type = "circle", cx = 0, cy = -28, r = 26 } ] } }
{ type = "sdf", fill = #4a9eff,
transform = { type = "translate", x = 110, y = 200 },
tree = { type = "ring", cx = 0, cy = 0, r = 36, thickness = 12 } }
{ type = "sdf", fill = #22c55e,
transform = { type = "translate", x = 490, y = 200 },
tree = { type = "arc", cx = 0, cy = 0, r = 36,
angle_start = -1.8, angle_end = 1.8, thickness = 10 } }
// ── Tight highlight splats on top of the SDF shapes (bloom effect) ──
glow(300, 200, #ff6b8a, 28, 0.6)
glow(300, 200, #ffffff, 10, 0.5)
glow(110, 200, #7ec8ff, 22, 0.55)
glow(110, 200, #ffffff, 8, 0.4)
glow(490, 200, #6effa0, 22, 0.55)
glow(490, 200, #ffffff, 8, 0.4)
// ── Ground reflection streak (anisotropic splat) ──────────────────
{ type = "splat", x = 300, y = 395, sigma_x = 220, sigma_y = 12,
color = #e94560, opacity = 0.2 }
)
<svg xmlns="http://www.w3.org/2000/svg" width="600" height="400" viewBox="0 0 600 400"><rect width="600" height="400" fill="#080810"/><defs><radialGradient id="splat-grad-1" cx="0.5" cy="0.5" r="0.5"><stop offset="0%" stop-color="#1a0533" stop-opacity="0.8"/><stop offset="55%" stop-color="#1a0533" stop-opacity="0.28"/><stop offset="100%" stop-color="#1a0533" stop-opacity="0"/></radialGradient><radialGradient id="splat-grad-2" cx="0.5" cy="0.5" r="0.5"><stop offset="0%" stop-color="#0f1a40" stop-opacity="0.6"/><stop offset="55%" stop-color="#0f1a40" stop-opacity="0.21"/><stop offset="100%" stop-color="#0f1a40" stop-opacity="0"/></radialGradient><radialGradient id="splat-grad-3" cx="0.5" cy="0.5" r="0.5"><stop offset="0%" stop-color="#001a20" stop-opacity="0.6"/><stop offset="55%" stop-color="#001a20" stop-opacity="0.21"/><stop offset="100%" stop-color="#001a20" stop-opacity="0"/></radialGradient><radialGradient id="splat-grad-4" cx="0.5" cy="0.5" r="0.5"><stop offset="0%" stop-color="#ff6b8a" stop-opacity="0.6"/><stop offset="55%" stop-color="#ff6b8a" stop-opacity="0.21"/><stop offset="100%" stop-color="#ff6b8a" stop-opacity="0"/></radialGradient><radialGradient id="splat-grad-5" cx="0.5" cy="0.5" r="0.5"><stop offset="0%" stop-color="#ffffff" stop-opacity="0.5"/><stop offset="55%" stop-color="#ffffff" stop-opacity="0.175"/><stop offset="100%" stop-color="#ffffff" stop-opacity="0"/></radialGradient><radialGradient id="splat-grad-6" cx="0.5" cy="0.5" r="0.5"><stop offset="0%" stop-color="#7ec8ff" stop-opacity="0.55"/><stop offset="55%" stop-color="#7ec8ff" stop-opacity="0.1925"/><stop offset="100%" stop-color="#7ec8ff" stop-opacity="0"/></radialGradient><radialGradient id="splat-grad-7" cx="0.5" cy="0.5" r="0.5"><stop offset="0%" stop-color="#ffffff" stop-opacity="0.4"/><stop offset="55%" stop-color="#ffffff" stop-opacity="0.14"/><stop offset="100%" stop-color="#ffffff" stop-opacity="0"/></radialGradient><radialGradient id="splat-grad-8" cx="0.5" cy="0.5" r="0.5"><stop offset="0%" stop-color="#6effa0" stop-opacity="0.55"/><stop offset="55%" stop-color="#6effa0" stop-opacity="0.1925"/><stop offset="100%" stop-color="#6effa0" stop-opacity="0"/></radialGradient><radialGradient id="splat-grad-9" cx="0.5" cy="0.5" r="0.5"><stop offset="0%" stop-color="#ffffff" stop-opacity="0.4"/><stop offset="55%" stop-color="#ffffff" stop-opacity="0.14"/><stop offset="100%" stop-color="#ffffff" stop-opacity="0"/></radialGradient><radialGradient id="splat-grad-10" cx="0.5" cy="0.5" r="0.5"><stop offset="0%" stop-color="#e94560" stop-opacity="0.2"/><stop offset="55%" stop-color="#e94560" stop-opacity="0.07"/><stop offset="100%" stop-color="#e94560" stop-opacity="0"/></radialGradient></defs><ellipse cx="300" cy="200" rx="432" ry="432" fill="url(#splat-grad-1)"/><ellipse cx="180" cy="160" rx="288" ry="288" fill="url(#splat-grad-2)"/><ellipse cx="420" cy="240" rx="264" ry="264" fill="url(#splat-grad-3)"/><rect x="40" y="140" width="140" height="120" rx="8" fill="#0f3460" stroke="#4a9eff" stroke-width="1.5" opacity="0.9"/><circle cx="300" cy="200" r="70" fill="#1a0533" stroke="#a78bfa" stroke-width="2" opacity="0.85"/><rect x="420" y="140" width="140" height="120" rx="8" fill="#001a20" stroke="#22c55e" stroke-width="1.5" opacity="0.9"/><!-- sdf node 'smooth_union': use msx-render-cpu/msx-render-gpu for native support --><!-- sdf node 'ring': use msx-render-cpu/msx-render-gpu for native support --><!-- sdf node 'arc': use msx-render-cpu/msx-render-gpu for native support --><ellipse cx="300" cy="200" rx="67.2" ry="67.2" fill="url(#splat-grad-4)"/><ellipse cx="300" cy="200" rx="24" ry="24" fill="url(#splat-grad-5)"/><ellipse cx="110" cy="200" rx="52.8" ry="52.8" fill="url(#splat-grad-6)"/><ellipse cx="110" cy="200" rx="19.2" ry="19.2" fill="url(#splat-grad-7)"/><ellipse cx="490" cy="200" rx="52.8" ry="52.8" fill="url(#splat-grad-8)"/><ellipse cx="490" cy="200" rx="19.2" ry="19.2" fill="url(#splat-grad-9)"/><ellipse cx="300" cy="395" rx="528" ry="28.8" fill="url(#splat-grad-10)"/></svg>
// examples/sdf_splat_orbit.msx
// Animated companion to sdf_splat_mixed.msx — same "hard SDF shape + soft
// splat glow" language, but now the splat bloom breathes in sync with the
// SDF blob's pulse, and a second splat drifts past behind both.
//
// z-order matters here: splats paint as soft glow, SDF paints with a hard
// edge. Elements later in `elements::` paint on top of earlier ones, so
// the glow splats are listed FIRST (a halo sitting behind the shape) and
// the SDF blob LAST (a crisp shape on top of that halo) — get this
// backwards and the glow just paints over the SDF, and the whole thing
// reads as one undifferentiated pulsing light instead of three legible,
// separately-animated pieces.
@CONFIG( version -> "1.0.0" )
@DATA(
scene = { width = 500, height = 300, background = #080810 }
duration = 1.4
loop_mode = "ping_pong"
elements::
// Slow drifting atmosphere, furthest back and off to the side so its
// own motion is legible on its own, not stacked under everything else.
{ type = "splat", id = "glow_drift", x = 120, y = 60,
sigma_x = 70, sigma_y = 40, color = #16224f, opacity = 0.5 }
// Soft halo behind the blob — smaller than the SDF shape itself and
// dim, so it reads as a glow AROUND the shape rather than covering it.
{ type = "splat", id = "glow_bloom", x = 250, y = 170,
sigma_x = 16, sigma_y = 16, color = #ff6b8a, opacity = 0.35 }
{ type = "splat", id = "glow_bloom_hot", x = 250, y = 170,
sigma_x = 8, sigma_y = 8, color = #ffffff, opacity = 0.3 }
// The SDF blob on top — two smooth-merged circles, breathing + turning
// a full 45° so the rotation is unmistakable against the static halo.
// Cyan is deliberate: nothing else in this scene uses that hue, so the
// shape reads as clearly distinct from the pink/white glow behind it
// even after GIF's 256-color palette quantization/dithering — a
// same-family color (the original crimson) risked blending into the
// glow's gradient once compressed, even with correct z-order/opacity.
{ type = "sdf", id = "core_blob", fill = #2dd4ff,
transform = { type = "translate", x = 250, y = 170 },
tree = { type = "smooth_union", k = 0.35,
children = [ { type = "circle", cx = -20, cy = 0, r = 34 },
{ type = "circle", cx = 20, cy = 0, r = 34 } ] } }
animations::
// Atmosphere drifts on its own slower rhythm, well clear of the blob.
{ target_id = "glow_drift", property = "translate_x",
keyframes = [ { time = 0.0, value = -80.0 },
{ time = 1.4, value = 80.0, easing = "ease_in_out" } ] }
// Blob breathes (scale) and turns a full 45°, unmissable against the
// halo sitting still behind it.
{ target_id = "core_blob", property = "scale_x",
keyframes = [ { time = 0.0, value = 1.0 },
{ time = 0.7, value = 1.3, easing = "ease_out" } ] }
{ target_id = "core_blob", property = "scale_y",
keyframes = [ { time = 0.0, value = 1.0 },
{ time = 0.7, value = 1.3, easing = "ease_out" } ] }
{ target_id = "core_blob", property = "rotate",
keyframes = [ { time = 0.0, value = 0.0 },
{ time = 1.4, value = 45.0, easing = "ease_in_out" } ] }
// Halo grows and brightens in lockstep with the blob's scale peak,
// but stays dim enough that the SDF's hard edge never disappears.
{ target_id = "glow_bloom", property = "scale_x",
keyframes = [ { time = 0.0, value = 1.0 },
{ time = 0.7, value = 2.2, easing = "ease_out" } ] }
{ target_id = "glow_bloom", property = "scale_y",
keyframes = [ { time = 0.0, value = 1.0 },
{ time = 0.7, value = 2.2, easing = "ease_out" } ] }
{ target_id = "glow_bloom", property = "opacity",
keyframes = [ { time = 0.0, value = 0.35 },
{ time = 0.7, value = 0.55, easing = "ease_out" } ] }
{ target_id = "glow_bloom_hot", property = "scale_x",
keyframes = [ { time = 0.0, value = 1.0 },
{ time = 0.7, value = 2.4, easing = "ease_out" } ] }
{ target_id = "glow_bloom_hot", property = "scale_y",
keyframes = [ { time = 0.0, value = 1.0 },
{ time = 0.7, value = 2.4, easing = "ease_out" } ] }
)
<svg xmlns="http://www.w3.org/2000/svg" width="500" height="300" viewBox="0 0 500 300"><rect width="500" height="300" fill="#080810"/><defs><radialGradient id="splat-grad-1" cx="0.5" cy="0.5" r="0.5"><stop offset="0%" stop-color="#16224f" stop-opacity="0.5"/><stop offset="55%" stop-color="#16224f" stop-opacity="0.175"/><stop offset="100%" stop-color="#16224f" stop-opacity="0"/></radialGradient><radialGradient id="splat-grad-2" cx="0.5" cy="0.5" r="0.5"><stop offset="0%" stop-color="#ff6b8a" stop-opacity="0.35"/><stop offset="55%" stop-color="#ff6b8a" stop-opacity="0.1225"/><stop offset="100%" stop-color="#ff6b8a" stop-opacity="0"/></radialGradient><radialGradient id="splat-grad-3" cx="0.5" cy="0.5" r="0.5"><stop offset="0%" stop-color="#ffffff" stop-opacity="0.3"/><stop offset="55%" stop-color="#ffffff" stop-opacity="0.105"/><stop offset="100%" stop-color="#ffffff" stop-opacity="0"/></radialGradient></defs><ellipse cx="120" cy="60" rx="168" ry="96" fill="url(#splat-grad-1)" id="glow_drift"/><ellipse cx="250" cy="170" rx="38.4" ry="38.4" fill="url(#splat-grad-2)" id="glow_bloom"/><ellipse cx="250" cy="170" rx="19.2" ry="19.2" fill="url(#splat-grad-3)" id="glow_bloom_hot"/><!-- sdf node 'smooth_union': use msx-render-cpu/msx-render-gpu for native support --></svg>
// examples/shader_checkerboard.msx
// Second real shader-def example alongside shader_placeholder.msx —
// exercises msx-render-gpu's real WGSL-execution path (shader.rs) with
// the simplest possible test pattern instead of an organic effect, so a
// wrong render is immediately obvious rather than merely "looks a bit
// off" (see shaders/checkerboard.wgsl's header for the full rationale).
//
// Rendering status, same caveat as every shader-def example in this repo:
// only `msx rasterize-gpu` (msx-render-gpu, built with --features gpu)
// actually executes this WGSL. `msx rasterize` (CPU) and `msx render`
// (SVG) both fall back to flat `fallback_color` — see Def::Shader's doc
// comment in core/msx-ast/src/gradient.rs.
@CONFIG( version -> "1.0.0" )
@DATA(
scene = { width = 300, height = 200, background = #14141c }
defs::
{ type = "shader", id = "checker_1", source_ref = "shaders/checkerboard.wgsl",
entry_point = "fs_main", fallback_color = #3a3a4a,
uniforms = [ { name = "cells", type = "float", value = 10.0 },
{ name = "resolution", type = "vec2", value = [300.0, 200.0] },
{ name = "color_a", type = "vec3", value = [0.9, 0.9, 0.95] },
{ name = "color_b", type = "vec3", value = [0.16, 0.16, 0.22] } ] }
elements::
{ type = "rect", x = 20, y = 20, width = 260, height = 160, rx = 8,
style = { fill = "url(#checker_1)", stroke = "none", stroke_width = 0, opacity = 1.0 } }
)
<svg xmlns="http://www.w3.org/2000/svg" width="300" height="200" viewBox="0 0 300 200"><rect width="300" height="200" fill="#14141c"/><defs><!-- shader 'checker_1': WGSL has no SVG equivalent, renders as none in SVG export (native raster paths use fallback_color #3a3a4a instead) --></defs><rect x="20" y="20" width="260" height="160" rx="8" fill="url(#checker_1)" stroke="none" stroke-width="0"/></svg>
// examples/shader_orb.msx
// Third real shader-def example, alongside shader_placeholder.msx
// (plasma) and shader_checkerboard.msx (diagnostic grid) — this one is
// the "something cool" of the set: a raymarched, softly-lit, rim-glowing
// orb floating against a gradient void. It's also the heaviest WGSL of
// the three by a wide margin (a real sphere-tracing loop, not a single
// analytic expression per pixel) and the first to exercise two
// consecutive vec3 uniforms back to back — see shaders/orb_raymarch.wgsl's
// header for exactly why that's a genuinely new case, not just a new
// picture.
//
// Rendering status, same caveat as every shader-def example in this repo:
// only `msx rasterize-gpu` (msx-render-gpu, built with --features gpu)
// actually executes this WGSL. `msx rasterize` (CPU) and `msx render`
// (SVG) both fall back to flat `fallback_color` — see Def::Shader's doc
// comment in core/msx-ast/src/gradient.rs.
@CONFIG( version -> "1.0.0" )
@DATA(
scene = { width = 300, height = 200, background = #05050a }
defs::
{ type = "shader", id = "orb_1", source_ref = "shaders/orb_raymarch.wgsl",
entry_point = "fs_main", fallback_color = #7c5cff,
uniforms = [ { name = "resolution", type = "vec2", value = [300.0, 200.0] },
{ name = "base_color", type = "vec3", value = [0.35, 0.25, 0.95] },
{ name = "rim_color", type = "vec3", value = [0.4, 0.85, 1.0] },
{ name = "speed", type = "float", value = 1.0 } ] }
elements::
{ type = "rect", x = 0, y = 0, width = 300, height = 200,
style = { fill = "url(#orb_1)", stroke = "none", stroke_width = 0, opacity = 1.0 } }
)
<svg xmlns="http://www.w3.org/2000/svg" width="300" height="200" viewBox="0 0 300 200"><rect width="300" height="200" fill="#05050a"/><defs><!-- shader 'orb_1': WGSL has no SVG equivalent, renders as none in SVG export (native raster paths use fallback_color #7c5cff instead) --></defs><rect x="0" y="0" width="300" height="200" fill="url(#orb_1)" stroke="none" stroke-width="0"/></svg>
// examples/shader_placeholder.msx
// Demonstrates a shader def referenced from a shape's fill, exactly like a
// gradient (`Paint::Ref("url(#id)")`). `source_ref` is a path to a real
// .wgsl file elsewhere in the repo, resolved/validated by `msx-cli compile`
// — this .msx file never embeds shader source itself (see the
// FUTURE(raw-section) note on ShaderDef in core/msx-ast/src/gradient.rs
// for why, and what changes if DixScript ever grows a raw text section).
//
// No renderer executes WGSL yet, so every render path today paints this
// rect with `fallback_color` — CPU/GPU raster paint it flat, and SVG
// export renders it as `none` (documented gap, see Def::to_svg). That's
// expected until msx-render-gpu grows a real WGSL-executing path.
@CONFIG( version -> "1.0.0" )
@DATA(
scene = { width = 300, height = 200, background = #14141c }
defs::
{ type = "shader", id = "plasma_1", source_ref = "shaders/plasma.wgsl",
entry_point = "fs_main", fallback_color = #6b46ff,
uniforms = [ { name = "speed", type = "float", value = 1.5 },
{ name = "resolution", type = "vec2", value = [300.0, 200.0] } ] }
elements::
{ type = "rect", x = 40, y = 40, width = 220, height = 120, rx = 12,
style = { fill = "url(#plasma_1)", stroke = "none", stroke_width = 0, opacity = 1.0 } }
)
<svg xmlns="http://www.w3.org/2000/svg" width="300" height="200" viewBox="0 0 300 200"><rect width="300" height="200" fill="#14141c"/><defs><!-- shader 'plasma_1': WGSL has no SVG equivalent, renders as none in SVG export (native raster paths use fallback_color #6b46ff instead) --></defs><rect x="40" y="40" width="220" height="120" rx="12" fill="url(#plasma_1)" stroke="none" stroke-width="0"/></svg>
// examples/shader_placeholder.msx
// Demonstrates a shader def referenced from a shape's fill, exactly like a
// gradient (`Paint::Ref("url(#id)")`). `source_ref` is a path to a real
// .wgsl file elsewhere in the repo, resolved/validated by `msx-cli compile`
// — this .msx file never embeds shader source itself (see the
// FUTURE(raw-section) note on ShaderDef in core/msx-ast/src/gradient.rs
// for why, and what changes if DixScript ever grows a raw text section).
//
// No renderer executes WGSL yet, so every render path today paints this
// rect with `fallback_color` — CPU/GPU raster paint it flat, and SVG
// export renders it as `none` (documented gap, see Def::to_svg). That's
// expected until msx-render-gpu grows a real WGSL-executing path.
@CONFIG( version -> "1.0.0" )
@DATA(
scene = { width = 300, height = 200, background = #14141c }
defs::
{ type = "shader", id = "plasma_1", source_ref = "shaders/plasma.wgsl",
entry_point = "fs_main", fallback_color = #6b46ff,
uniforms = [ { name = "speed", type = "float", value = 1.5 },
{ name = "resolution", type = "vec2", value = [300.0, 200.0] } ] }
elements::
{ type = "rect", x = 40, y = 40, width = 220, height = 120, rx = 12,
style = { fill = "url(#plasma_1)", stroke = "none", stroke_width = 0, opacity = 1.0 } }
)
<svg xmlns="http://www.w3.org/2000/svg" width="300" height="200" viewBox="0 0 300 200"><rect width="300" height="200" fill="#14141c"/><defs><!-- shader 'plasma_1': WGSL has no SVG equivalent, renders as none in SVG export (native raster paths use fallback_color #6b46ff instead) --></defs><rect x="40" y="40" width="220" height="120" rx="12" fill="url(#plasma_1)" stroke="none" stroke-width="0"/></svg>
// examples/splat_atmosphere.msx
// Gaussian splats — additive soft glowing ellipses.
// Each splat is: opacity * exp(-(dx²/2σx² + dy²/2σy²))
// They accumulate alpha over each other (painter's algorithm, back to
// front). The result is painterly in a way hard vector shapes aren't —
// smooth light bloom, atmospheric haze, soft shadows. This is what makes
// MSX different from SVG: the two types of mark co-exist and compose.
@CONFIG( version -> "1.0.0" )
@DATA(
scene = { width = 600, height = 400, background = #020408 }
elements::
// Background atmosphere — large, dim, overlapping color fields
{ type = "splat", x = 180, y = 200, sigma_x = 140, sigma_y = 110,
color = #1a0533, opacity = 0.9 }
{ type = "splat", x = 420, y = 200, sigma_x = 140, sigma_y = 110,
color = #001a33, opacity = 0.9 }
{ type = "splat", x = 300, y = 220, sigma_x = 160, sigma_y = 100,
color = #0d0d2b, opacity = 0.8 }
// Mid-range color clouds
{ type = "splat", x = 120, y = 160, sigma_x = 90, sigma_y = 70,
color = #533483, opacity = 0.7 }
{ type = "splat", x = 480, y = 170, sigma_x = 85, sigma_y = 65,
color = #0f3460, opacity = 0.7 }
{ type = "splat", x = 300, y = 340, sigma_x = 110, sigma_y = 50,
color = #1a0533, opacity = 0.6 }
// Accent glows — tighter, brighter, directional
{ type = "splat", x = 150, y = 180, sigma_x = 55, sigma_y = 40,
color = #a78bfa, opacity = 0.75 }
{ type = "splat", x = 460, y = 190, sigma_x = 50, sigma_y = 38,
color = #4a9eff, opacity = 0.8 }
{ type = "splat", x = 290, y = 150, sigma_x = 45, sigma_y = 35,
color = #e94560, opacity = 0.55 }
{ type = "splat", x = 310, y = 260, sigma_x = 40, sigma_y = 30,
color = #22c55e, opacity = 0.5 }
// Hot core highlights — small sigma = tight, bright center point
{ type = "splat", x = 152, y = 182, sigma_x = 18, sigma_y = 14,
color = #ffffff, opacity = 0.85 }
{ type = "splat", x = 458, y = 192, sigma_x = 16, sigma_y = 13,
color = #e8f4ff, opacity = 0.9 }
{ type = "splat", x = 300, y = 155, sigma_x = 14, sigma_y = 11,
color = #ffe8ec, opacity = 0.7 }
// Anisotropic streaks — sigma_x >> sigma_y = elongated horizontally
{ type = "splat", x = 300, y = 380, sigma_x = 200, sigma_y = 18,
color = #4a9eff, opacity = 0.3 }
{ type = "splat", x = 300, y = 370, sigma_x = 120, sigma_y = 10,
color = #a78bfa, opacity = 0.25 }
)
<svg xmlns="http://www.w3.org/2000/svg" width="600" height="400" viewBox="0 0 600 400"><rect width="600" height="400" fill="#020408"/><defs><radialGradient id="splat-grad-1" cx="0.5" cy="0.5" r="0.5"><stop offset="0%" stop-color="#1a0533" stop-opacity="0.9"/><stop offset="55%" stop-color="#1a0533" stop-opacity="0.315"/><stop offset="100%" stop-color="#1a0533" stop-opacity="0"/></radialGradient><radialGradient id="splat-grad-2" cx="0.5" cy="0.5" r="0.5"><stop offset="0%" stop-color="#001a33" stop-opacity="0.9"/><stop offset="55%" stop-color="#001a33" stop-opacity="0.315"/><stop offset="100%" stop-color="#001a33" stop-opacity="0"/></radialGradient><radialGradient id="splat-grad-3" cx="0.5" cy="0.5" r="0.5"><stop offset="0%" stop-color="#0d0d2b" stop-opacity="0.8"/><stop offset="55%" stop-color="#0d0d2b" stop-opacity="0.28"/><stop offset="100%" stop-color="#0d0d2b" stop-opacity="0"/></radialGradient><radialGradient id="splat-grad-4" cx="0.5" cy="0.5" r="0.5"><stop offset="0%" stop-color="#533483" stop-opacity="0.7"/><stop offset="55%" stop-color="#533483" stop-opacity="0.245"/><stop offset="100%" stop-color="#533483" stop-opacity="0"/></radialGradient><radialGradient id="splat-grad-5" cx="0.5" cy="0.5" r="0.5"><stop offset="0%" stop-color="#0f3460" stop-opacity="0.7"/><stop offset="55%" stop-color="#0f3460" stop-opacity="0.245"/><stop offset="100%" stop-color="#0f3460" stop-opacity="0"/></radialGradient><radialGradient id="splat-grad-6" cx="0.5" cy="0.5" r="0.5"><stop offset="0%" stop-color="#1a0533" stop-opacity="0.6"/><stop offset="55%" stop-color="#1a0533" stop-opacity="0.21"/><stop offset="100%" stop-color="#1a0533" stop-opacity="0"/></radialGradient><radialGradient id="splat-grad-7" cx="0.5" cy="0.5" r="0.5"><stop offset="0%" stop-color="#a78bfa" stop-opacity="0.75"/><stop offset="55%" stop-color="#a78bfa" stop-opacity="0.2625"/><stop offset="100%" stop-color="#a78bfa" stop-opacity="0"/></radialGradient><radialGradient id="splat-grad-8" cx="0.5" cy="0.5" r="0.5"><stop offset="0%" stop-color="#4a9eff" stop-opacity="0.8"/><stop offset="55%" stop-color="#4a9eff" stop-opacity="0.28"/><stop offset="100%" stop-color="#4a9eff" stop-opacity="0"/></radialGradient><radialGradient id="splat-grad-9" cx="0.5" cy="0.5" r="0.5"><stop offset="0%" stop-color="#e94560" stop-opacity="0.55"/><stop offset="55%" stop-color="#e94560" stop-opacity="0.1925"/><stop offset="100%" stop-color="#e94560" stop-opacity="0"/></radialGradient><radialGradient id="splat-grad-10" cx="0.5" cy="0.5" r="0.5"><stop offset="0%" stop-color="#22c55e" stop-opacity="0.5"/><stop offset="55%" stop-color="#22c55e" stop-opacity="0.175"/><stop offset="100%" stop-color="#22c55e" stop-opacity="0"/></radialGradient><radialGradient id="splat-grad-11" cx="0.5" cy="0.5" r="0.5"><stop offset="0%" stop-color="#ffffff" stop-opacity="0.85"/><stop offset="55%" stop-color="#ffffff" stop-opacity="0.2975"/><stop offset="100%" stop-color="#ffffff" stop-opacity="0"/></radialGradient><radialGradient id="splat-grad-12" cx="0.5" cy="0.5" r="0.5"><stop offset="0%" stop-color="#e8f4ff" stop-opacity="0.9"/><stop offset="55%" stop-color="#e8f4ff" stop-opacity="0.315"/><stop offset="100%" stop-color="#e8f4ff" stop-opacity="0"/></radialGradient><radialGradient id="splat-grad-13" cx="0.5" cy="0.5" r="0.5"><stop offset="0%" stop-color="#ffe8ec" stop-opacity="0.7"/><stop offset="55%" stop-color="#ffe8ec" stop-opacity="0.245"/><stop offset="100%" stop-color="#ffe8ec" stop-opacity="0"/></radialGradient><radialGradient id="splat-grad-14" cx="0.5" cy="0.5" r="0.5"><stop offset="0%" stop-color="#4a9eff" stop-opacity="0.3"/><stop offset="55%" stop-color="#4a9eff" stop-opacity="0.105"/><stop offset="100%" stop-color="#4a9eff" stop-opacity="0"/></radialGradient><radialGradient id="splat-grad-15" cx="0.5" cy="0.5" r="0.5"><stop offset="0%" stop-color="#a78bfa" stop-opacity="0.25"/><stop offset="55%" stop-color="#a78bfa" stop-opacity="0.0875"/><stop offset="100%" stop-color="#a78bfa" stop-opacity="0"/></radialGradient></defs><ellipse cx="180" cy="200" rx="336" ry="264" fill="url(#splat-grad-1)"/><ellipse cx="420" cy="200" rx="336" ry="264" fill="url(#splat-grad-2)"/><ellipse cx="300" cy="220" rx="384" ry="240" fill="url(#splat-grad-3)"/><ellipse cx="120" cy="160" rx="216" ry="168" fill="url(#splat-grad-4)"/><ellipse cx="480" cy="170" rx="204" ry="156" fill="url(#splat-grad-5)"/><ellipse cx="300" cy="340" rx="264" ry="120" fill="url(#splat-grad-6)"/><ellipse cx="150" cy="180" rx="132" ry="96" fill="url(#splat-grad-7)"/><ellipse cx="460" cy="190" rx="120" ry="91.2" fill="url(#splat-grad-8)"/><ellipse cx="290" cy="150" rx="108" ry="84" fill="url(#splat-grad-9)"/><ellipse cx="310" cy="260" rx="96" ry="72" fill="url(#splat-grad-10)"/><ellipse cx="152" cy="182" rx="43.2" ry="33.6" fill="url(#splat-grad-11)"/><ellipse cx="458" cy="192" rx="38.4" ry="31.2" fill="url(#splat-grad-12)"/><ellipse cx="300" cy="155" rx="33.6" ry="26.4" fill="url(#splat-grad-13)"/><ellipse cx="300" cy="380" rx="480" ry="43.2" fill="url(#splat-grad-14)"/><ellipse cx="300" cy="370" rx="288" ry="24" fill="url(#splat-grad-15)"/></svg>
// examples/splat_gradient_fill.msx
// Tests GaussianSplat::fill with a gradient reference — the AST/parser/
// binary/CPU/SVG/GPU work from this session's splat pass.
//
// Important honesty check baked into this example: a gradient `fill` on
// a splat does NOT get a real per-pixel gradient anywhere, on any
// renderer — CPU, SVG, and GPU all resolve it down to ONE flat
// representative color (the gradient's stop average) and use that as the
// splat's peak color, same as a shader's `fallback_color` substitutes for
// real WGSL on non-GPU renderers. This is different from a vector shape's
// gradient fill, which DOES render as a real gradient everywhere (SVG
// natively, CPU/GPU via their own gradient-shader support). Splats never
// got that support — only flat colors — so a gradient reference here is
// genuinely just a convenient way to say "use this def's average color"
// rather than "render this gradient."
//
// The two splats below are side by side specifically so the difference
// between "plain `color`" and "`fill` pointing at a gradient" is visible
// at a glance: same gradient, but the left splat ignores it (no `fill`
// set) and the right one uses it.
@CONFIG( version -> "1.0.0" )
@DATA(
scene = { width = 300, height = 200, background = #14141c }
defs::
{ type = "linear_gradient", id = "warm_glow", x1 = 0.0, y1 = 0.0, x2 = 1.0, y2 = 0.0,
stops = [ { offset = 0.0, color = #ff7a00, opacity = 1.0 },
{ offset = 1.0, color = #7a1fa2, opacity = 1.0 } ] }
elements::
{ type = "splat", x = 100, y = 100, sigma_x = 40, sigma_y = 40,
color = #2ecc71, opacity = 0.9 }
{ type = "splat", x = 200, y = 100, sigma_x = 40, sigma_y = 40,
fill = "url(#warm_glow)", color = #2ecc71, opacity = 0.9 }
)
<svg xmlns="http://www.w3.org/2000/svg" width="300" height="200" viewBox="0 0 300 200"><rect width="300" height="200" fill="#14141c"/><defs><linearGradient id="warm_glow" x1="0" y1="0" x2="1" y2="0" gradientUnits="objectBoundingBox"><stop offset="0" stop-color="#ff7a00" stop-opacity="1"/><stop offset="1" stop-color="#7a1fa2" stop-opacity="1"/></linearGradient><radialGradient id="splat-grad-1" cx="0.5" cy="0.5" r="0.5"><stop offset="0%" stop-color="#2ecc71" stop-opacity="0.9"/><stop offset="55%" stop-color="#2ecc71" stop-opacity="0.315"/><stop offset="100%" stop-color="#2ecc71" stop-opacity="0"/></radialGradient><radialGradient id="splat-grad-2" cx="0.5" cy="0.5" r="0.5"><stop offset="0%" stop-color="#bc4c51" stop-opacity="0.9"/><stop offset="55%" stop-color="#bc4c51" stop-opacity="0.315"/><stop offset="100%" stop-color="#bc4c51" stop-opacity="0"/></radialGradient></defs><ellipse cx="100" cy="100" rx="96" ry="96" fill="url(#splat-grad-1)"/><ellipse cx="200" cy="100" rx="96" ry="96" fill="url(#splat-grad-2)"/></svg>
// examples/splat_shader_fill.msx
// Tests GaussianSplat::fill with a Def::Shader reference — the actual
// point of this session's GPU work: real WGSL execution masked to the
// splat's own Gaussian falloff (SplatPipeline::draw_mask +
// ShaderFillPipeline::draw + MaskedShaderComposite, see splat_shader.rs),
// not the shader painted flat across a bounding box.
//
// Reuses shaders/plasma.wgsl (already in the repo, see
// shader_placeholder.msx) rather than introducing new WGSL — the point of
// this file is exercising the splat-specific masking path, not testing a
// new shader.
//
// Rendering status, same caveat as every shader-def example in this repo:
// only `msx rasterize-gpu`/`animate-gpu` (msx-render-gpu, built with
// --features gpu) execute this WGSL and apply the real Gaussian mask.
// `msx rasterize` (CPU) and `msx render` (SVG) both resolve the fill to
// plasma's own `fallback_color` and paint it flat within the splat's
// (approximated, CPU/SVG-only) falloff shape.
//
// The plain flat-color splat on the left is there so the masking is
// obvious at a glance on the GPU render: if the mask were broken (e.g.
// painting the shader across the full bounding square instead of the
// true falloff), the right splat would show hard corners the left one
// doesn't have.
@CONFIG( version -> "1.0.0" )
@DATA(
scene = { width = 300, height = 200, background = #05050a }
defs::
{ type = "shader", id = "plasma_1", source_ref = "shaders/plasma.wgsl",
entry_point = "fs_main", fallback_color = #6a3de8,
uniforms = [ { name = "speed", type = "float", value = 1.5 },
{ name = "resolution", type = "vec2", value = [300.0, 200.0] } ] }
elements::
{ type = "splat", x = 100, y = 100, sigma_x = 45, sigma_y = 45,
color = #6a3de8, opacity = 1.0 }
{ type = "splat", x = 200, y = 100, sigma_x = 45, sigma_y = 45,
fill = "url(#plasma_1)", color = #6a3de8, opacity = 1.0 }
)
<svg xmlns="http://www.w3.org/2000/svg" width="300" height="200" viewBox="0 0 300 200"><rect width="300" height="200" fill="#05050a"/><defs><!-- shader 'plasma_1': WGSL has no SVG equivalent, renders as none in SVG export (native raster paths use fallback_color #6a3de8 instead) --><radialGradient id="splat-grad-1" cx="0.5" cy="0.5" r="0.5"><stop offset="0%" stop-color="#6a3de8" stop-opacity="1"/><stop offset="55%" stop-color="#6a3de8" stop-opacity="0.35"/><stop offset="100%" stop-color="#6a3de8" stop-opacity="0"/></radialGradient><radialGradient id="splat-grad-2" cx="0.5" cy="0.5" r="0.5"><stop offset="0%" stop-color="#6a3de8" stop-opacity="1"/><stop offset="55%" stop-color="#6a3de8" stop-opacity="0.35"/><stop offset="100%" stop-color="#6a3de8" stop-opacity="0"/></radialGradient></defs><ellipse cx="100" cy="100" rx="108" ry="108" fill="url(#splat-grad-1)"/><ellipse cx="200" cy="100" rx="108" ry="108" fill="url(#splat-grad-2)"/></svg>
Why MSX — DixScript + MBFA co-design
SVG is XML written by hand or generated by tools. MSX source files are DixScript — the same format powering configs, now driving vectors. QuickFuncs become parametric shape generators. MBFA compresses the typed binary stream.