├── dependencies ├── macosx │ ├── .gitignore │ ├── config_directories.sh │ └── get_imgui.sh ├── linux │ └── config_directories.sh ├── premake5_miniaudio.lua ├── premake5_miniaudio_v2.lua ├── windows │ ├── config_directories.bat │ └── get_premake5.bat └── jconfig.h ├── .rive_head ├── skia ├── font_converter │ ├── run.sh │ └── include │ │ └── util.hpp ├── dependencies │ ├── make_dependencies.sh │ ├── make_viewer_dependencies.sh │ ├── make_imgui.sh │ └── make_gl3w.sh ├── thumbnail_generator │ └── run.sh └── renderer │ └── include │ └── cg_skia_factory.hpp ├── tess ├── src │ ├── sokol │ │ └── generated │ │ │ └── .clang-format │ └── sub_path.cpp └── test │ ├── assets │ ├── marty.riv │ └── triangle.riv │ └── main_test.cpp ├── dev ├── defs │ ├── README.md │ ├── shapes │ │ ├── shape.json │ │ ├── ellipse.json │ │ ├── triangle.json │ │ ├── contour_mesh_vertex.json │ │ ├── paint │ │ │ ├── radial_gradient.json │ │ │ ├── fill.json │ │ │ ├── solid_color.json │ │ │ └── shape_paint.json │ │ ├── path_vertex.json │ │ ├── cubic_vertex.json │ │ ├── path.json │ │ ├── star.json │ │ └── straight_vertex.json │ ├── layout │ │ ├── axis_x.json │ │ ├── axis_y.json │ │ └── n_slicer.json │ ├── assets │ │ ├── folder.json │ │ ├── svg_asset.json │ │ ├── layered_asset.json │ │ └── lottie_asset.json │ ├── animation │ │ ├── any_state.json │ │ ├── exit_state.json │ │ ├── entry_state.json │ │ ├── keyframe_interpolator.json │ │ ├── transition_comparator.json │ │ ├── keyframe_callback.json │ │ ├── blend_state.json │ │ ├── state_machine_layer_component.json │ │ ├── animation_folder.json │ │ ├── state_machine_trigger.json │ │ ├── listener_trigger_change.json │ │ ├── transition_bool_condition.json │ │ ├── cubic_ease_interpolator.json │ │ ├── transition_trigger_condition.json │ │ ├── nested_state_machine.json │ │ ├── transition_artboard_condition.json │ │ ├── blend_state_direct.json │ │ ├── cubic_value_interpolator.json │ │ ├── transition_value_comparator.json │ │ ├── state_machine_input_folder.json │ │ ├── state_machine_component_folder.json │ │ ├── transition_property_comparator.json │ │ ├── state_machine_listener_folder.json │ │ ├── nested_trigger.json │ │ ├── keyframe_color.json │ │ ├── blend_animation_1d.json │ │ ├── keyframe_double.json │ │ ├── advanceable_state.json │ │ ├── keyframe_uint.json │ │ ├── keyframe_bool.json │ │ ├── keyframe_string.json │ │ ├── transition_number_condition.json │ │ ├── nested_bool.json │ │ ├── nested_number.json │ │ ├── transition_value_number_comparator.json │ │ ├── transition_value_string_comparator.json │ │ ├── transition_value_boolean_comparator.json │ │ ├── transition_value_color_comparator.json │ │ ├── keyframe_id.json │ │ ├── listener_bool_change.json │ │ └── listener_number_change.json │ ├── custom_property.json │ ├── text │ │ ├── text_modifier.json │ │ └── text_shape_modifier.json │ ├── container_component.json │ ├── bones │ │ ├── skeletal_component.json │ │ └── bone.json │ ├── constraints │ │ ├── scale_constraint.json │ │ ├── rotation_constraint.json │ │ └── translation_constraint.json │ ├── viewmodel │ │ ├── viewmodel_property_list.json │ │ ├── viewmodel_instance_list.json │ │ ├── viewmodel_property_color.json │ │ ├── viewmodel_property_number.json │ │ ├── viewmodel_property_string.json │ │ ├── viewmodel_property_boolean.json │ │ └── viewmodel_component.json │ ├── data_bind │ │ ├── converters │ │ │ ├── data_converter_group.json │ │ │ └── data_converter_to_string.json │ │ └── bindable_property.json │ ├── custom_property_number.json │ ├── custom_property_string.json │ ├── custom_property_boolean.json │ └── world_transform_component.json ├── core_generator │ ├── pubspec.yaml │ └── lib │ │ └── src │ │ ├── configuration.dart │ │ └── field_types │ │ ├── bool_field_type.dart │ │ ├── color_field_type.dart │ │ ├── callback_field_type.dart │ │ └── uint_field_type.dart ├── generate_core.sh ├── update_defs.sh └── analyze.sh ├── test ├── assets │ ├── 1.webp │ ├── bad.jpg │ ├── bad.png │ ├── entry.riv │ ├── juice.riv │ ├── sound.riv │ ├── tape.riv │ ├── trim.riv │ ├── walle.riv │ ├── bad_skin.riv │ ├── ellipsis.riv │ ├── new_text.riv │ ├── rocket.riv │ ├── sound2.riv │ ├── Montserrat.ttf │ ├── RobotoFlex.ttf │ ├── audio │ │ ├── song.mp3 │ │ └── what.wav │ ├── ball_test.riv │ ├── blend_test.riv │ ├── bullet_man.riv │ ├── clip_tests.riv │ ├── long_name.riv │ ├── shapetest.riv │ ├── solo_test.riv │ ├── align_target.riv │ ├── circle_clips.riv │ ├── click_event.riv │ ├── death_knight.riv │ ├── double_line.riv │ ├── fix_rectangle.riv │ ├── follow_path.riv │ ├── hello_world.riv │ ├── in_band_asset.riv │ ├── light_switch.riv │ ├── modifier_test.riv │ ├── nested_solo.riv │ ├── off_road_car.riv │ ├── oneshotblend.riv │ ├── open_source.jpg │ ├── placeholder.png │ ├── quantize_test.riv │ ├── solar-system.riv │ ├── test_elastic.riv │ ├── two_artboards.riv │ ├── two_bone_ik.riv │ ├── zombie_skins.riv │ ├── dependency_test.riv │ ├── draw_rule_cycle.riv │ ├── hit_test_solos.riv │ ├── jellyfish_test.riv │ ├── modifier_to_run.riv │ ├── opaque_hit_test.riv │ ├── pointer_events.riv │ ├── artboardclipping.riv │ ├── background_measure.riv │ ├── cubic_value_test.riv │ ├── event_on_listener.riv │ ├── events_on_states.riv │ ├── hosted_font_file.riv │ ├── hosted_image_file.riv │ ├── joystick_flag_test.riv │ ├── nested_event_test.riv │ ├── out_of_band │ │ ├── walle.riv │ │ ├── eve-317.png │ │ └── walle-370.png │ ├── scale_constraint.riv │ ├── stroke_name_test.riv │ ├── test_modifier_run.riv │ ├── trim_path_linear.riv │ ├── distance_constraint.riv │ ├── layout │ │ ├── layout_center.riv │ │ ├── measure_tests.riv │ │ ├── layout_vertical.riv │ │ ├── layout_horizontal.riv │ │ ├── layout_horizontal_gaps.riv │ │ └── layout_horizontal_wrap.riv │ ├── rotation_constraint.riv │ ├── solos_collapse_tests.riv │ ├── timeline_event_test.riv │ ├── transform_constraint.riv │ ├── animation_reset_cases.riv │ ├── complex_ik_dependency.riv │ ├── looping_timeline_events.riv │ ├── multiple_state_machines.riv │ ├── nested_artboard_opacity.riv │ ├── runtime_nested_inputs.riv │ ├── translation_constraint.riv │ ├── IBMPlexSansArabic-Regular.ttf │ ├── runtime_nested_text_runs.riv │ ├── state_machine_transition.riv │ ├── follow_path_path_0_opacity.riv │ ├── follow_path_with_0_opacity.riv │ ├── solos_with_nested_artboards.riv │ ├── LibreBodoni-Italic-VariableFont_wght.ttf │ ├── NotoSansArabic-VariableFont_wdth,wght.ttf │ └── pointer_events_nested_artboards_in_solos.riv ├── main_test.cpp ├── rive_testing.cpp └── node_test.cpp ├── src ├── audio │ └── audio_engine.m ├── animation │ ├── keyframe_callback.cpp │ ├── transition_property_comparator.cpp │ ├── transition_value_enum_comparator.cpp │ ├── cubic_interpolator.cpp │ ├── blend_animation_1d.cpp │ ├── state_instance.cpp │ ├── cubic_ease_interpolator.cpp │ └── system_state_instance.cpp ├── node.cpp ├── shapes │ └── straight_vertex.cpp ├── core │ └── field_types │ │ ├── core_bool_type.cpp │ │ ├── core_color_type.cpp │ │ ├── core_double_type.cpp │ │ ├── core_string_type.cpp │ │ ├── core_bytes_type.cpp │ │ └── core_uint_type.cpp ├── generated │ ├── node_base.cpp │ ├── solo_base.cpp │ ├── event_base.cpp │ ├── bones │ │ ├── bone_base.cpp │ │ ├── skin_base.cpp │ │ ├── tendon_base.cpp │ │ ├── weight_base.cpp │ │ ├── root_bone_base.cpp │ │ └── cubic_weight_base.cpp │ ├── text │ │ ├── text_base.cpp │ │ ├── text_style_base.cpp │ │ ├── text_value_run_base.cpp │ │ ├── text_style_axis_base.cpp │ │ ├── text_style_feature_base.cpp │ │ ├── text_modifier_group_base.cpp │ │ ├── text_modifier_range_base.cpp │ │ └── text_variation_modifier_base.cpp │ ├── artboard_base.cpp │ ├── joystick_base.cpp │ ├── shapes │ │ ├── mesh_base.cpp │ │ ├── star_base.cpp │ │ ├── image_base.cpp │ │ ├── shape_base.cpp │ │ ├── ellipse_base.cpp │ │ ├── polygon_base.cpp │ │ ├── paint │ │ │ ├── fill_base.cpp │ │ │ ├── stroke_base.cpp │ │ │ ├── trim_path_base.cpp │ │ │ ├── solid_color_base.cpp │ │ │ ├── gradient_stop_base.cpp │ │ │ ├── linear_gradient_base.cpp │ │ │ └── radial_gradient_base.cpp │ │ ├── triangle_base.cpp │ │ ├── rectangle_base.cpp │ │ ├── mesh_vertex_base.cpp │ │ ├── points_path_base.cpp │ │ ├── clipping_shape_base.cpp │ │ ├── straight_vertex_base.cpp │ │ ├── contour_mesh_vertex_base.cpp │ │ ├── cubic_detached_vertex_base.cpp │ │ ├── cubic_mirrored_vertex_base.cpp │ │ └── cubic_asymmetric_vertex_base.cpp │ ├── backboard_base.cpp │ ├── draw_rules_base.cpp │ ├── assets │ │ ├── folder_base.cpp │ │ ├── font_asset_base.cpp │ │ ├── audio_asset_base.cpp │ │ ├── image_asset_base.cpp │ │ └── file_asset_contents_base.cpp │ ├── audio_event_base.cpp │ ├── draw_target_base.cpp │ ├── layout │ │ ├── axis_x_base.cpp │ │ ├── axis_y_base.cpp │ │ ├── n_slicer_base.cpp │ │ ├── n_slicer_tile_mode_base.cpp │ │ └── layout_component_style_base.cpp │ ├── open_url_event_base.cpp │ ├── animation │ │ ├── any_state_base.cpp │ │ ├── animation_base.cpp │ │ ├── exit_state_base.cpp │ │ ├── entry_state_base.cpp │ │ ├── keyframe_id_base.cpp │ │ ├── nested_bool_base.cpp │ │ ├── keyed_object_base.cpp │ │ ├── keyframe_bool_base.cpp │ │ ├── keyframe_uint_base.cpp │ │ ├── nested_number_base.cpp │ │ ├── state_machine_base.cpp │ │ ├── blend_state_1d_base.cpp │ │ ├── keyed_property_base.cpp │ │ ├── keyframe_color_base.cpp │ │ ├── nested_trigger_base.cpp │ │ ├── animation_state_base.cpp │ │ ├── keyframe_double_base.cpp │ │ ├── keyframe_string_base.cpp │ │ ├── linear_animation_base.cpp │ │ ├── state_transition_base.cpp │ │ ├── keyframe_callback_base.cpp │ │ ├── blend_animation_1d_base.cpp │ │ ├── blend_state_direct_base.cpp │ │ ├── state_machine_bool_base.cpp │ │ ├── listener_fire_event_base.cpp │ │ ├── state_machine_layer_base.cpp │ │ ├── elastic_interpolator_base.cpp │ │ ├── listener_bool_change_base.cpp │ │ ├── nested_state_machine_base.cpp │ │ ├── state_machine_number_base.cpp │ │ ├── listener_align_target_base.cpp │ │ ├── state_machine_trigger_base.cpp │ │ ├── blend_animation_direct_base.cpp │ │ ├── blend_state_transition_base.cpp │ │ ├── listener_number_change_base.cpp │ │ ├── nested_remap_animation_base.cpp │ │ ├── state_machine_listener_base.cpp │ │ ├── cubic_ease_interpolator_base.cpp │ │ ├── listener_trigger_change_base.cpp │ │ ├── nested_simple_animation_base.cpp │ │ ├── cubic_value_interpolator_base.cpp │ │ ├── state_machine_fire_event_base.cpp │ │ ├── listener_viewmodel_change_base.cpp │ │ ├── transition_bool_condition_base.cpp │ │ ├── transition_number_condition_base.cpp │ │ ├── cubic_interpolator_component_base.cpp │ │ ├── transition_trigger_condition_base.cpp │ │ ├── transition_artboard_condition_base.cpp │ │ ├── transition_viewmodel_condition_base.cpp │ │ ├── transition_value_enum_comparator_base.cpp │ │ ├── transition_value_color_comparator_base.cpp │ │ ├── transition_value_number_comparator_base.cpp │ │ ├── transition_value_string_comparator_base.cpp │ │ ├── transition_value_boolean_comparator_base.cpp │ │ ├── transition_property_artboard_comparator_base.cpp │ │ └── transition_property_viewmodel_comparator_base.cpp │ ├── data_bind │ │ ├── data_bind_base.cpp │ │ ├── data_bind_context_base.cpp │ │ ├── bindable_property_enum_base.cpp │ │ ├── bindable_property_color_base.cpp │ │ ├── bindable_property_number_base.cpp │ │ ├── bindable_property_string_base.cpp │ │ ├── bindable_property_boolean_base.cpp │ │ └── converters │ │ │ ├── data_converter_group_base.cpp │ │ │ ├── data_converter_rounder_base.cpp │ │ │ ├── data_converter_to_string_base.cpp │ │ │ ├── data_converter_group_item_base.cpp │ │ │ └── data_converter_operation_base.cpp │ ├── nested_artboard_base.cpp │ ├── viewmodel │ │ ├── data_enum_base.cpp │ │ ├── viewmodel_base.cpp │ │ ├── data_enum_value_base.cpp │ │ ├── viewmodel_instance_base.cpp │ │ ├── viewmodel_property_base.cpp │ │ ├── viewmodel_component_base.cpp │ │ ├── viewmodel_instance_enum_base.cpp │ │ ├── viewmodel_instance_list_base.cpp │ │ ├── viewmodel_property_enum_base.cpp │ │ ├── viewmodel_property_list_base.cpp │ │ ├── viewmodel_instance_color_base.cpp │ │ ├── viewmodel_property_color_base.cpp │ │ ├── viewmodel_instance_number_base.cpp │ │ ├── viewmodel_instance_string_base.cpp │ │ ├── viewmodel_property_number_base.cpp │ │ ├── viewmodel_property_string_base.cpp │ │ ├── viewmodel_instance_boolean_base.cpp │ │ ├── viewmodel_property_boolean_base.cpp │ │ ├── viewmodel_instance_list_item_base.cpp │ │ ├── viewmodel_instance_viewmodel_base.cpp │ │ └── viewmodel_property_viewmodel_base.cpp │ ├── layout_component_base.cpp │ ├── nested_artboard_leaf_base.cpp │ ├── constraints │ │ ├── ik_constraint_base.cpp │ │ ├── scale_constraint_base.cpp │ │ ├── distance_constraint_base.cpp │ │ ├── rotation_constraint_base.cpp │ │ ├── transform_constraint_base.cpp │ │ ├── follow_path_constraint_base.cpp │ │ └── translation_constraint_base.cpp │ ├── custom_property_number_base.cpp │ ├── custom_property_string_base.cpp │ ├── nested_artboard_layout_base.cpp │ └── custom_property_boolean_base.cpp ├── viewmodel │ ├── viewmodel_instance_color.cpp │ ├── viewmodel_instance_boolean.cpp │ ├── viewmodel_instance_number.cpp │ ├── viewmodel_instance_string.cpp │ └── viewmodel_instance_viewmodel.cpp ├── event.cpp ├── importers │ ├── bindable_property_importer.cpp │ ├── data_converter_group_importer.cpp │ ├── enum_importer.cpp │ └── keyed_object_importer.cpp ├── simple_array.cpp ├── text │ └── font_hb_apple.mm └── data_bind │ └── context │ └── context_value_list_item.cpp ├── viewer ├── src │ └── platform │ │ ├── viewer_mac.m │ │ └── imgui_sokol_impl.cpp └── include │ └── viewer │ └── tess │ └── viewer_sokol_factory.hpp └── include └── rive ├── transform_space.hpp ├── backboard.hpp ├── clip_result.hpp ├── hit_result.hpp ├── draw_target_placement.hpp ├── animation ├── animation.hpp ├── easing.hpp ├── artboard_property.hpp ├── any_state.hpp ├── exit_state.hpp ├── entry_state.hpp ├── keyframe_callback.hpp ├── advanceable_state.hpp ├── arithmetic_operation.hpp ├── state_machine_bool.hpp ├── state_machine_trigger.hpp ├── state_machine_number.hpp ├── state_machine_component.hpp ├── transition_condition_op.hpp ├── transition_value_comparator.hpp ├── transition_value_enum_comparator.hpp ├── transition_artboard_condition.hpp ├── nested_trigger.hpp ├── transition_property_comparator.hpp ├── blend_state_direct.hpp ├── nested_simple_animation.hpp ├── transition_input_condition.hpp ├── nested_bool.hpp ├── nested_number.hpp ├── blend_animation_1d.hpp ├── keyed_callback_reporter.hpp ├── keyframe.hpp └── listener_fire_event.hpp ├── gesture_click_phase.hpp ├── layout ├── axis.hpp ├── layout_measure_mode.hpp ├── axis_x.hpp ├── axis_y.hpp ├── n_slicer.hpp └── n_slicer_tile_mode.hpp ├── assets ├── asset.hpp ├── folder.hpp ├── export_audio.hpp └── drawable_asset.hpp ├── audio └── audio_format.hpp ├── event.hpp ├── listener_type.hpp ├── open_url_event.hpp ├── custom_property.hpp ├── status_code.hpp ├── math └── circle_constant.hpp ├── node.hpp ├── core └── field_types │ ├── core_bool_type.hpp │ ├── core_color_type.hpp │ ├── core_double_type.hpp │ ├── core_uint_type.hpp │ ├── core_string_type.hpp │ └── core_bytes_type.hpp ├── shapes ├── contour_mesh_vertex.hpp ├── straight_vertex.hpp ├── mesh_vertex.hpp ├── ellipse.hpp ├── path_vertex.hpp ├── paint │ ├── gradient_stop.hpp │ ├── stroke_effect.hpp │ └── stroke_cap.hpp ├── triangle.hpp ├── star.hpp └── cubic_mirrored_vertex.hpp ├── bones ├── skeletal_component.hpp ├── root_bone.hpp └── cubic_weight.hpp ├── custom_property_number.hpp ├── custom_property_string.hpp ├── custom_property_boolean.hpp ├── text ├── text_modifier.hpp ├── text_style_feature.hpp └── text_style_axis.hpp ├── viewmodel ├── viewmodel_component.hpp ├── viewmodel_property_list.hpp ├── viewmodel_property_color.hpp ├── data_enum_value.hpp ├── viewmodel_property_number.hpp ├── viewmodel_property_string.hpp ├── viewmodel_property_boolean.hpp ├── viewmodel_property.hpp ├── viewmodel_property_viewmodel.hpp ├── viewmodel_instance_color.hpp ├── viewmodel_instance_string.hpp ├── viewmodel_instance_number.hpp └── viewmodel_instance_boolean.hpp ├── core_context.hpp ├── data_bind ├── bindable_property.hpp ├── bindable_property_enum.hpp ├── bindable_property_color.hpp ├── bindable_property_number.hpp ├── bindable_property_string.hpp └── bindable_property_boolean.hpp ├── bounds_provider.hpp ├── nested_artboard_leaf.hpp ├── constraints ├── transform_component_constraint_y.hpp ├── translation_constraint.hpp └── distance_constraint.hpp ├── hit_info.hpp ├── solo.hpp └── event_report.hpp /dependencies/macosx/.gitignore: -------------------------------------------------------------------------------- 1 | cache 2 | -------------------------------------------------------------------------------- /.rive_head: -------------------------------------------------------------------------------- 1 | b2d27b6bde96e68a9cac4f3b7efd12782e9351cd 2 | -------------------------------------------------------------------------------- /skia/font_converter/run.sh: -------------------------------------------------------------------------------- 1 | ./build/macosx/bin/debug/font_converter -------------------------------------------------------------------------------- /dependencies/linux/config_directories.sh: -------------------------------------------------------------------------------- 1 | ../macosx/config_directories.sh -------------------------------------------------------------------------------- /skia/dependencies/make_dependencies.sh: -------------------------------------------------------------------------------- 1 | ./make_skia.sh 2 | ./make_glfw.sh -------------------------------------------------------------------------------- /skia/thumbnail_generator/run.sh: -------------------------------------------------------------------------------- 1 | ./build/bin/debug/rive_thumbnail_generator -------------------------------------------------------------------------------- /tess/src/sokol/generated/.clang-format: -------------------------------------------------------------------------------- 1 | DisableFormat: true 2 | SortIncludes: false -------------------------------------------------------------------------------- /dev/defs/README.md: -------------------------------------------------------------------------------- 1 | # rive-core-defs 2 | Core definitions for Rive editor and runtimes. 3 | -------------------------------------------------------------------------------- /test/assets/1.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rive-app/rive-cpp-legacy/HEAD/test/assets/1.webp -------------------------------------------------------------------------------- /test/assets/bad.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rive-app/rive-cpp-legacy/HEAD/test/assets/bad.jpg -------------------------------------------------------------------------------- /test/assets/bad.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rive-app/rive-cpp-legacy/HEAD/test/assets/bad.png -------------------------------------------------------------------------------- /test/assets/entry.riv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rive-app/rive-cpp-legacy/HEAD/test/assets/entry.riv -------------------------------------------------------------------------------- /test/assets/juice.riv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rive-app/rive-cpp-legacy/HEAD/test/assets/juice.riv -------------------------------------------------------------------------------- /test/assets/sound.riv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rive-app/rive-cpp-legacy/HEAD/test/assets/sound.riv -------------------------------------------------------------------------------- /test/assets/tape.riv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rive-app/rive-cpp-legacy/HEAD/test/assets/tape.riv -------------------------------------------------------------------------------- /test/assets/trim.riv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rive-app/rive-cpp-legacy/HEAD/test/assets/trim.riv -------------------------------------------------------------------------------- /test/assets/walle.riv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rive-app/rive-cpp-legacy/HEAD/test/assets/walle.riv -------------------------------------------------------------------------------- /test/assets/bad_skin.riv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rive-app/rive-cpp-legacy/HEAD/test/assets/bad_skin.riv -------------------------------------------------------------------------------- /test/assets/ellipsis.riv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rive-app/rive-cpp-legacy/HEAD/test/assets/ellipsis.riv -------------------------------------------------------------------------------- /test/assets/new_text.riv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rive-app/rive-cpp-legacy/HEAD/test/assets/new_text.riv -------------------------------------------------------------------------------- /test/assets/rocket.riv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rive-app/rive-cpp-legacy/HEAD/test/assets/rocket.riv -------------------------------------------------------------------------------- /test/assets/sound2.riv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rive-app/rive-cpp-legacy/HEAD/test/assets/sound2.riv -------------------------------------------------------------------------------- /tess/test/assets/marty.riv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rive-app/rive-cpp-legacy/HEAD/tess/test/assets/marty.riv -------------------------------------------------------------------------------- /test/assets/Montserrat.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rive-app/rive-cpp-legacy/HEAD/test/assets/Montserrat.ttf -------------------------------------------------------------------------------- /test/assets/RobotoFlex.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rive-app/rive-cpp-legacy/HEAD/test/assets/RobotoFlex.ttf -------------------------------------------------------------------------------- /test/assets/audio/song.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rive-app/rive-cpp-legacy/HEAD/test/assets/audio/song.mp3 -------------------------------------------------------------------------------- /test/assets/audio/what.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rive-app/rive-cpp-legacy/HEAD/test/assets/audio/what.wav -------------------------------------------------------------------------------- /test/assets/ball_test.riv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rive-app/rive-cpp-legacy/HEAD/test/assets/ball_test.riv -------------------------------------------------------------------------------- /test/assets/blend_test.riv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rive-app/rive-cpp-legacy/HEAD/test/assets/blend_test.riv -------------------------------------------------------------------------------- /test/assets/bullet_man.riv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rive-app/rive-cpp-legacy/HEAD/test/assets/bullet_man.riv -------------------------------------------------------------------------------- /test/assets/clip_tests.riv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rive-app/rive-cpp-legacy/HEAD/test/assets/clip_tests.riv -------------------------------------------------------------------------------- /test/assets/long_name.riv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rive-app/rive-cpp-legacy/HEAD/test/assets/long_name.riv -------------------------------------------------------------------------------- /test/assets/shapetest.riv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rive-app/rive-cpp-legacy/HEAD/test/assets/shapetest.riv -------------------------------------------------------------------------------- /test/assets/solo_test.riv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rive-app/rive-cpp-legacy/HEAD/test/assets/solo_test.riv -------------------------------------------------------------------------------- /skia/dependencies/make_viewer_dependencies.sh: -------------------------------------------------------------------------------- 1 | ./make_skia.sh 2 | ./make_glfw.sh 3 | ./make_gl3w.sh 4 | ./make_imgui.sh -------------------------------------------------------------------------------- /tess/test/assets/triangle.riv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rive-app/rive-cpp-legacy/HEAD/tess/test/assets/triangle.riv -------------------------------------------------------------------------------- /test/assets/align_target.riv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rive-app/rive-cpp-legacy/HEAD/test/assets/align_target.riv -------------------------------------------------------------------------------- /test/assets/circle_clips.riv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rive-app/rive-cpp-legacy/HEAD/test/assets/circle_clips.riv -------------------------------------------------------------------------------- /test/assets/click_event.riv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rive-app/rive-cpp-legacy/HEAD/test/assets/click_event.riv -------------------------------------------------------------------------------- /test/assets/death_knight.riv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rive-app/rive-cpp-legacy/HEAD/test/assets/death_knight.riv -------------------------------------------------------------------------------- /test/assets/double_line.riv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rive-app/rive-cpp-legacy/HEAD/test/assets/double_line.riv -------------------------------------------------------------------------------- /test/assets/fix_rectangle.riv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rive-app/rive-cpp-legacy/HEAD/test/assets/fix_rectangle.riv -------------------------------------------------------------------------------- /test/assets/follow_path.riv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rive-app/rive-cpp-legacy/HEAD/test/assets/follow_path.riv -------------------------------------------------------------------------------- /test/assets/hello_world.riv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rive-app/rive-cpp-legacy/HEAD/test/assets/hello_world.riv -------------------------------------------------------------------------------- /test/assets/in_band_asset.riv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rive-app/rive-cpp-legacy/HEAD/test/assets/in_band_asset.riv -------------------------------------------------------------------------------- /test/assets/light_switch.riv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rive-app/rive-cpp-legacy/HEAD/test/assets/light_switch.riv -------------------------------------------------------------------------------- /test/assets/modifier_test.riv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rive-app/rive-cpp-legacy/HEAD/test/assets/modifier_test.riv -------------------------------------------------------------------------------- /test/assets/nested_solo.riv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rive-app/rive-cpp-legacy/HEAD/test/assets/nested_solo.riv -------------------------------------------------------------------------------- /test/assets/off_road_car.riv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rive-app/rive-cpp-legacy/HEAD/test/assets/off_road_car.riv -------------------------------------------------------------------------------- /test/assets/oneshotblend.riv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rive-app/rive-cpp-legacy/HEAD/test/assets/oneshotblend.riv -------------------------------------------------------------------------------- /test/assets/open_source.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rive-app/rive-cpp-legacy/HEAD/test/assets/open_source.jpg -------------------------------------------------------------------------------- /test/assets/placeholder.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rive-app/rive-cpp-legacy/HEAD/test/assets/placeholder.png -------------------------------------------------------------------------------- /test/assets/quantize_test.riv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rive-app/rive-cpp-legacy/HEAD/test/assets/quantize_test.riv -------------------------------------------------------------------------------- /test/assets/solar-system.riv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rive-app/rive-cpp-legacy/HEAD/test/assets/solar-system.riv -------------------------------------------------------------------------------- /test/assets/test_elastic.riv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rive-app/rive-cpp-legacy/HEAD/test/assets/test_elastic.riv -------------------------------------------------------------------------------- /test/assets/two_artboards.riv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rive-app/rive-cpp-legacy/HEAD/test/assets/two_artboards.riv -------------------------------------------------------------------------------- /test/assets/two_bone_ik.riv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rive-app/rive-cpp-legacy/HEAD/test/assets/two_bone_ik.riv -------------------------------------------------------------------------------- /test/assets/zombie_skins.riv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rive-app/rive-cpp-legacy/HEAD/test/assets/zombie_skins.riv -------------------------------------------------------------------------------- /src/audio/audio_engine.m: -------------------------------------------------------------------------------- 1 | #ifdef WITH_RIVE_AUDIO 2 | #define MINIAUDIO_IMPLEMENTATION 3 | #include "miniaudio.h" 4 | #endif -------------------------------------------------------------------------------- /test/assets/dependency_test.riv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rive-app/rive-cpp-legacy/HEAD/test/assets/dependency_test.riv -------------------------------------------------------------------------------- /test/assets/draw_rule_cycle.riv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rive-app/rive-cpp-legacy/HEAD/test/assets/draw_rule_cycle.riv -------------------------------------------------------------------------------- /test/assets/hit_test_solos.riv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rive-app/rive-cpp-legacy/HEAD/test/assets/hit_test_solos.riv -------------------------------------------------------------------------------- /test/assets/jellyfish_test.riv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rive-app/rive-cpp-legacy/HEAD/test/assets/jellyfish_test.riv -------------------------------------------------------------------------------- /test/assets/modifier_to_run.riv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rive-app/rive-cpp-legacy/HEAD/test/assets/modifier_to_run.riv -------------------------------------------------------------------------------- /test/assets/opaque_hit_test.riv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rive-app/rive-cpp-legacy/HEAD/test/assets/opaque_hit_test.riv -------------------------------------------------------------------------------- /test/assets/pointer_events.riv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rive-app/rive-cpp-legacy/HEAD/test/assets/pointer_events.riv -------------------------------------------------------------------------------- /src/animation/keyframe_callback.cpp: -------------------------------------------------------------------------------- 1 | #include "rive/animation/keyframe_callback.hpp" 2 | #include "rive/core_context.hpp" 3 | -------------------------------------------------------------------------------- /test/assets/artboardclipping.riv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rive-app/rive-cpp-legacy/HEAD/test/assets/artboardclipping.riv -------------------------------------------------------------------------------- /test/assets/background_measure.riv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rive-app/rive-cpp-legacy/HEAD/test/assets/background_measure.riv -------------------------------------------------------------------------------- /test/assets/cubic_value_test.riv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rive-app/rive-cpp-legacy/HEAD/test/assets/cubic_value_test.riv -------------------------------------------------------------------------------- /test/assets/event_on_listener.riv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rive-app/rive-cpp-legacy/HEAD/test/assets/event_on_listener.riv -------------------------------------------------------------------------------- /test/assets/events_on_states.riv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rive-app/rive-cpp-legacy/HEAD/test/assets/events_on_states.riv -------------------------------------------------------------------------------- /test/assets/hosted_font_file.riv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rive-app/rive-cpp-legacy/HEAD/test/assets/hosted_font_file.riv -------------------------------------------------------------------------------- /test/assets/hosted_image_file.riv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rive-app/rive-cpp-legacy/HEAD/test/assets/hosted_image_file.riv -------------------------------------------------------------------------------- /test/assets/joystick_flag_test.riv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rive-app/rive-cpp-legacy/HEAD/test/assets/joystick_flag_test.riv -------------------------------------------------------------------------------- /test/assets/nested_event_test.riv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rive-app/rive-cpp-legacy/HEAD/test/assets/nested_event_test.riv -------------------------------------------------------------------------------- /test/assets/out_of_band/walle.riv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rive-app/rive-cpp-legacy/HEAD/test/assets/out_of_band/walle.riv -------------------------------------------------------------------------------- /test/assets/scale_constraint.riv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rive-app/rive-cpp-legacy/HEAD/test/assets/scale_constraint.riv -------------------------------------------------------------------------------- /test/assets/stroke_name_test.riv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rive-app/rive-cpp-legacy/HEAD/test/assets/stroke_name_test.riv -------------------------------------------------------------------------------- /test/assets/test_modifier_run.riv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rive-app/rive-cpp-legacy/HEAD/test/assets/test_modifier_run.riv -------------------------------------------------------------------------------- /test/assets/trim_path_linear.riv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rive-app/rive-cpp-legacy/HEAD/test/assets/trim_path_linear.riv -------------------------------------------------------------------------------- /test/assets/distance_constraint.riv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rive-app/rive-cpp-legacy/HEAD/test/assets/distance_constraint.riv -------------------------------------------------------------------------------- /test/assets/layout/layout_center.riv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rive-app/rive-cpp-legacy/HEAD/test/assets/layout/layout_center.riv -------------------------------------------------------------------------------- /test/assets/layout/measure_tests.riv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rive-app/rive-cpp-legacy/HEAD/test/assets/layout/measure_tests.riv -------------------------------------------------------------------------------- /test/assets/out_of_band/eve-317.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rive-app/rive-cpp-legacy/HEAD/test/assets/out_of_band/eve-317.png -------------------------------------------------------------------------------- /test/assets/rotation_constraint.riv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rive-app/rive-cpp-legacy/HEAD/test/assets/rotation_constraint.riv -------------------------------------------------------------------------------- /test/assets/solos_collapse_tests.riv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rive-app/rive-cpp-legacy/HEAD/test/assets/solos_collapse_tests.riv -------------------------------------------------------------------------------- /test/assets/timeline_event_test.riv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rive-app/rive-cpp-legacy/HEAD/test/assets/timeline_event_test.riv -------------------------------------------------------------------------------- /test/assets/transform_constraint.riv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rive-app/rive-cpp-legacy/HEAD/test/assets/transform_constraint.riv -------------------------------------------------------------------------------- /viewer/src/platform/viewer_mac.m: -------------------------------------------------------------------------------- 1 | #define SOKOL_IMPL 2 | #include "sokol_app.h" 3 | #include "sokol_gfx.h" 4 | #include "sokol_glue.h" -------------------------------------------------------------------------------- /test/assets/animation_reset_cases.riv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rive-app/rive-cpp-legacy/HEAD/test/assets/animation_reset_cases.riv -------------------------------------------------------------------------------- /test/assets/complex_ik_dependency.riv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rive-app/rive-cpp-legacy/HEAD/test/assets/complex_ik_dependency.riv -------------------------------------------------------------------------------- /test/assets/layout/layout_vertical.riv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rive-app/rive-cpp-legacy/HEAD/test/assets/layout/layout_vertical.riv -------------------------------------------------------------------------------- /test/assets/looping_timeline_events.riv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rive-app/rive-cpp-legacy/HEAD/test/assets/looping_timeline_events.riv -------------------------------------------------------------------------------- /test/assets/multiple_state_machines.riv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rive-app/rive-cpp-legacy/HEAD/test/assets/multiple_state_machines.riv -------------------------------------------------------------------------------- /test/assets/nested_artboard_opacity.riv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rive-app/rive-cpp-legacy/HEAD/test/assets/nested_artboard_opacity.riv -------------------------------------------------------------------------------- /test/assets/out_of_band/walle-370.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rive-app/rive-cpp-legacy/HEAD/test/assets/out_of_band/walle-370.png -------------------------------------------------------------------------------- /test/assets/runtime_nested_inputs.riv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rive-app/rive-cpp-legacy/HEAD/test/assets/runtime_nested_inputs.riv -------------------------------------------------------------------------------- /test/assets/translation_constraint.riv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rive-app/rive-cpp-legacy/HEAD/test/assets/translation_constraint.riv -------------------------------------------------------------------------------- /src/animation/transition_property_comparator.cpp: -------------------------------------------------------------------------------- 1 | #include "rive/animation/transition_property_comparator.hpp" 2 | 3 | using namespace rive; -------------------------------------------------------------------------------- /test/assets/IBMPlexSansArabic-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rive-app/rive-cpp-legacy/HEAD/test/assets/IBMPlexSansArabic-Regular.ttf -------------------------------------------------------------------------------- /test/assets/layout/layout_horizontal.riv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rive-app/rive-cpp-legacy/HEAD/test/assets/layout/layout_horizontal.riv -------------------------------------------------------------------------------- /test/assets/runtime_nested_text_runs.riv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rive-app/rive-cpp-legacy/HEAD/test/assets/runtime_nested_text_runs.riv -------------------------------------------------------------------------------- /test/assets/state_machine_transition.riv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rive-app/rive-cpp-legacy/HEAD/test/assets/state_machine_transition.riv -------------------------------------------------------------------------------- /test/assets/follow_path_path_0_opacity.riv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rive-app/rive-cpp-legacy/HEAD/test/assets/follow_path_path_0_opacity.riv -------------------------------------------------------------------------------- /test/assets/follow_path_with_0_opacity.riv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rive-app/rive-cpp-legacy/HEAD/test/assets/follow_path_with_0_opacity.riv -------------------------------------------------------------------------------- /test/assets/solos_with_nested_artboards.riv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rive-app/rive-cpp-legacy/HEAD/test/assets/solos_with_nested_artboards.riv -------------------------------------------------------------------------------- /dev/core_generator/pubspec.yaml: -------------------------------------------------------------------------------- 1 | name: core_generator 2 | 3 | environment: 4 | sdk: ">=2.17.0 <3.0.0" 5 | 6 | dependencies: 7 | colorize: ^3.0.0 8 | -------------------------------------------------------------------------------- /skia/font_converter/include/util.hpp: -------------------------------------------------------------------------------- 1 | #ifndef UTIL_HPP 2 | #define UTIL_HPP 3 | 4 | int nextMultipleOf(float number, int multiple_of); 5 | 6 | #endif -------------------------------------------------------------------------------- /test/assets/layout/layout_horizontal_gaps.riv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rive-app/rive-cpp-legacy/HEAD/test/assets/layout/layout_horizontal_gaps.riv -------------------------------------------------------------------------------- /test/assets/layout/layout_horizontal_wrap.riv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rive-app/rive-cpp-legacy/HEAD/test/assets/layout/layout_horizontal_wrap.riv -------------------------------------------------------------------------------- /dependencies/premake5_miniaudio.lua: -------------------------------------------------------------------------------- 1 | local dependency = require('dependency') 2 | miniaudio = dependency.github('rive-app/miniaudio', 'rive_changes_4') 3 | -------------------------------------------------------------------------------- /dev/defs/shapes/shape.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Shape", 3 | "key": { 4 | "int": 3, 5 | "string": "shape" 6 | }, 7 | "extends": "drawable.json" 8 | } -------------------------------------------------------------------------------- /dev/defs/layout/axis_x.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "AxisX", 3 | "key": { 4 | "int": 495, 5 | "string": "axisx" 6 | }, 7 | "extends": "layout/axis.json" 8 | } -------------------------------------------------------------------------------- /dev/defs/layout/axis_y.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "AxisY", 3 | "key": { 4 | "int": 494, 5 | "string": "axisy" 6 | }, 7 | "extends": "layout/axis.json" 8 | } -------------------------------------------------------------------------------- /dev/defs/assets/folder.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Folder", 3 | "key": { 4 | "int": 102, 5 | "string": "folder" 6 | }, 7 | "extends": "assets/asset.json" 8 | } -------------------------------------------------------------------------------- /test/assets/LibreBodoni-Italic-VariableFont_wght.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rive-app/rive-cpp-legacy/HEAD/test/assets/LibreBodoni-Italic-VariableFont_wght.ttf -------------------------------------------------------------------------------- /test/assets/NotoSansArabic-VariableFont_wdth,wght.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rive-app/rive-cpp-legacy/HEAD/test/assets/NotoSansArabic-VariableFont_wdth,wght.ttf -------------------------------------------------------------------------------- /test/assets/pointer_events_nested_artboards_in_solos.riv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rive-app/rive-cpp-legacy/HEAD/test/assets/pointer_events_nested_artboards_in_solos.riv -------------------------------------------------------------------------------- /viewer/src/platform/imgui_sokol_impl.cpp: -------------------------------------------------------------------------------- 1 | #include "sokol_app.h" 2 | #include "sokol_gfx.h" 3 | #define SOKOL_IMPL 4 | #include "imgui.h" 5 | #include "util/sokol_imgui.h" -------------------------------------------------------------------------------- /dev/defs/layout/n_slicer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "NSlicer", 3 | "key": { 4 | "int": 493, 5 | "string": "nslicer" 6 | }, 7 | "extends": "container_component.json" 8 | } -------------------------------------------------------------------------------- /dev/defs/shapes/ellipse.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Ellipse", 3 | "key": { 4 | "int": 4, 5 | "string": "ellipse" 6 | }, 7 | "extends": "shapes/parametric_path.json" 8 | } -------------------------------------------------------------------------------- /src/node.cpp: -------------------------------------------------------------------------------- 1 | #include "rive/node.hpp" 2 | 3 | using namespace rive; 4 | 5 | void Node::xChanged() { markTransformDirty(); } 6 | void Node::yChanged() { markTransformDirty(); } -------------------------------------------------------------------------------- /dev/defs/shapes/triangle.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Triangle", 3 | "key": { 4 | "int": 8, 5 | "string": "triangle" 6 | }, 7 | "extends": "shapes/parametric_path.json" 8 | } -------------------------------------------------------------------------------- /src/shapes/straight_vertex.cpp: -------------------------------------------------------------------------------- 1 | #include "rive/shapes/straight_vertex.hpp" 2 | 3 | using namespace rive; 4 | 5 | void StraightVertex::radiusChanged() { markGeometryDirty(); } 6 | -------------------------------------------------------------------------------- /dev/defs/animation/any_state.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "AnyState", 3 | "key": { 4 | "int": 62, 5 | "string": "anystate" 6 | }, 7 | "extends": "animation/layer_state.json" 8 | } -------------------------------------------------------------------------------- /dev/defs/animation/exit_state.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "ExitState", 3 | "key": { 4 | "int": 64, 5 | "string": "exitstate" 6 | }, 7 | "extends": "animation/layer_state.json" 8 | } -------------------------------------------------------------------------------- /dependencies/premake5_miniaudio_v2.lua: -------------------------------------------------------------------------------- 1 | dofile('rive_build_config.lua') 2 | local dependency = require('dependency') 3 | miniaudio = dependency.github('rive-app/miniaudio', 'rive_changes_4') 4 | -------------------------------------------------------------------------------- /dev/defs/animation/entry_state.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "EntryState", 3 | "key": { 4 | "int": 63, 5 | "string": "entrystate" 6 | }, 7 | "extends": "animation/layer_state.json" 8 | } -------------------------------------------------------------------------------- /dev/defs/animation/keyframe_interpolator.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "KeyFrameInterpolator", 3 | "key": { 4 | "int": 175, 5 | "string": "keyframeinterpolator" 6 | }, 7 | "abstract": true 8 | } -------------------------------------------------------------------------------- /dev/defs/animation/transition_comparator.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "TransitionComparator", 3 | "key": { 4 | "int": 477, 5 | "string": "transitioncomparator" 6 | }, 7 | "abstract": true 8 | } -------------------------------------------------------------------------------- /src/animation/transition_value_enum_comparator.cpp: -------------------------------------------------------------------------------- 1 | #include "rive/animation/transition_value_enum_comparator.hpp" 2 | #include "rive/viewmodel/viewmodel_instance_enum.hpp" 3 | 4 | using namespace rive; -------------------------------------------------------------------------------- /dev/defs/animation/keyframe_callback.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "KeyFrameCallback", 3 | "key": { 4 | "int": 171, 5 | "string": "keyframe_callback" 6 | }, 7 | "extends": "animation/keyframe.json" 8 | } -------------------------------------------------------------------------------- /dev/defs/assets/svg_asset.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "SVGAsset", 3 | "key": { 4 | "int": 132, 5 | "string": "svgasset" 6 | }, 7 | "extends": "assets/drawable_asset.json", 8 | "runtime": false 9 | } -------------------------------------------------------------------------------- /dev/defs/custom_property.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "CustomProperty", 3 | "key": { 4 | "int": 167, 5 | "string": "customproperty" 6 | }, 7 | "abstract": true, 8 | "extends": "component.json" 9 | } -------------------------------------------------------------------------------- /dev/defs/shapes/contour_mesh_vertex.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "ContourMeshVertex", 3 | "key": { 4 | "int": 111, 5 | "string": "contourmeshvertex" 6 | }, 7 | "extends": "shapes/mesh_vertex.json" 8 | } -------------------------------------------------------------------------------- /dev/defs/text/text_modifier.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "TextModifier", 3 | "key": { 4 | "int": 160, 5 | "string": "textmodifier" 6 | }, 7 | "abstract": true, 8 | "extends": "component.json" 9 | } -------------------------------------------------------------------------------- /dev/defs/shapes/paint/radial_gradient.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "RadialGradient", 3 | "key": { 4 | "int": 17, 5 | "string": "radialgradient" 6 | }, 7 | "extends": "shapes/paint/linear_gradient.json" 8 | } -------------------------------------------------------------------------------- /dependencies/windows/config_directories.bat: -------------------------------------------------------------------------------- 1 | set "SCRIPT_DIR=%~dp0" 2 | 3 | set "DEPENDENCIES_SCRIPTS=%SCRIPT_DIR%" 4 | set "DEPENDENCIES=%SCRIPT_DIR%cache" 5 | 6 | if not exist %DEPENDENCIES% mkdir %DEPENDENCIES% -------------------------------------------------------------------------------- /dev/defs/animation/blend_state.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "BlendState", 3 | "key": { 4 | "int": 72, 5 | "string": "blendstate" 6 | }, 7 | "abstract": true, 8 | "extends": "animation/layer_state.json" 9 | } -------------------------------------------------------------------------------- /dev/defs/animation/state_machine_layer_component.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "StateMachineLayerComponent", 3 | "key": { 4 | "int": 66, 5 | "string": "statemachinelayercomponent" 6 | }, 7 | "abstract": true 8 | } -------------------------------------------------------------------------------- /dev/defs/assets/layered_asset.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "LayeredAsset", 3 | "key": { 4 | "int": 119, 5 | "string": "layeredasset" 6 | }, 7 | "extends": "assets/drawable_asset.json", 8 | "runtime": false 9 | } -------------------------------------------------------------------------------- /dev/defs/assets/lottie_asset.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "LottieAsset", 3 | "key": { 4 | "int": 133, 5 | "string": "lottieasset" 6 | }, 7 | "extends": "assets/drawable_asset.json", 8 | "runtime": false 9 | } -------------------------------------------------------------------------------- /dev/defs/container_component.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "ContainerComponent", 3 | "key": { 4 | "int": 11, 5 | "string": "containercomponent" 6 | }, 7 | "abstract": true, 8 | "extends": "component.json" 9 | } -------------------------------------------------------------------------------- /dev/defs/animation/animation_folder.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "AnimationFolder", 3 | "key": { 4 | "int": 143, 5 | "string": "animationfolder" 6 | }, 7 | "extends": "animation/animation.json", 8 | "runtime": false 9 | } -------------------------------------------------------------------------------- /dev/defs/animation/state_machine_trigger.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "StateMachineTrigger", 3 | "key": { 4 | "int": 58, 5 | "string": "statemachinetrigger" 6 | }, 7 | "extends": "animation/state_machine_input.json" 8 | } -------------------------------------------------------------------------------- /dependencies/macosx/config_directories.sh: -------------------------------------------------------------------------------- 1 | SCRIPT_DIR=$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" &>/dev/null && pwd) 2 | export DEPENDENCIES_SCRIPTS=$SCRIPT_DIR 3 | export DEPENDENCIES=$SCRIPT_DIR/cache 4 | mkdir -p $DEPENDENCIES 5 | -------------------------------------------------------------------------------- /dev/core_generator/lib/src/configuration.dart: -------------------------------------------------------------------------------- 1 | String defsPath = "./defs/"; 2 | String generatedHppPath = "../include/rive/generated/"; 3 | String concreteHppPath = "../include/"; 4 | String generatedCppPath = "../src/generated/"; 5 | -------------------------------------------------------------------------------- /dev/defs/bones/skeletal_component.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "SkeletalComponent", 3 | "key": { 4 | "int": 39, 5 | "string": "skeletalcomponent" 6 | }, 7 | "abstract": true, 8 | "extends": "transform_component.json" 9 | } -------------------------------------------------------------------------------- /dev/defs/constraints/scale_constraint.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "ScaleConstraint", 3 | "key": { 4 | "int": 88, 5 | "string": "scaleconstraint" 6 | }, 7 | "extends": "constraints/transform_component_constraint_y.json" 8 | } -------------------------------------------------------------------------------- /dev/defs/text/text_shape_modifier.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "TextShapeModifier", 3 | "key": { 4 | "int": 161, 5 | "string": "textshapemodifier" 6 | }, 7 | "abstract": true, 8 | "extends": "text/text_modifier.json" 9 | } -------------------------------------------------------------------------------- /dev/defs/viewmodel/viewmodel_property_list.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "ViewModelPropertyList", 3 | "key": { 4 | "int": 434, 5 | "string": "viewmodelpropertylist" 6 | }, 7 | "extends": "viewmodel/viewmodel_property.json" 8 | } -------------------------------------------------------------------------------- /dev/defs/animation/listener_trigger_change.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "ListenerTriggerChange", 3 | "key": { 4 | "int": 115, 5 | "string": "listener_trigger_change" 6 | }, 7 | "extends": "animation/listener_input_change.json" 8 | } -------------------------------------------------------------------------------- /dev/defs/constraints/rotation_constraint.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "RotationConstraint", 3 | "key": { 4 | "int": 89, 5 | "string": "rotationconstraint" 6 | }, 7 | "extends": "constraints/transform_component_constraint.json" 8 | } -------------------------------------------------------------------------------- /dev/defs/viewmodel/viewmodel_instance_list.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "ViewModelInstanceList", 3 | "key": { 4 | "int": 441, 5 | "string": "viewmodelinstancelist" 6 | }, 7 | "extends": "viewmodel/viewmodel_instance_value.json" 8 | } -------------------------------------------------------------------------------- /dev/defs/viewmodel/viewmodel_property_color.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "ViewModelPropertyColor", 3 | "key": { 4 | "int": 440, 5 | "string": "viewmodelpropertycolor" 6 | }, 7 | "extends": "viewmodel/viewmodel_property.json" 8 | } -------------------------------------------------------------------------------- /dev/defs/viewmodel/viewmodel_property_number.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "ViewModelPropertyNumber", 3 | "key": { 4 | "int": 431, 5 | "string": "viewmodelpropertynumber" 6 | }, 7 | "extends": "viewmodel/viewmodel_property.json" 8 | } -------------------------------------------------------------------------------- /dev/defs/viewmodel/viewmodel_property_string.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "ViewModelPropertyString", 3 | "key": { 4 | "int": 443, 5 | "string": "viewmodelpropertystring" 6 | }, 7 | "extends": "viewmodel/viewmodel_property.json" 8 | } -------------------------------------------------------------------------------- /dev/defs/data_bind/converters/data_converter_group.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "DataConverterGroup", 3 | "key": { 4 | "int": 499, 5 | "string": "dataconvertergroup" 6 | }, 7 | "extends": "data_bind/converters/data_converter.json" 8 | } -------------------------------------------------------------------------------- /dev/defs/viewmodel/viewmodel_property_boolean.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "ViewModelPropertyBoolean", 3 | "key": { 4 | "int": 448, 5 | "string": "viewmodelpropertyboolean" 6 | }, 7 | "extends": "viewmodel/viewmodel_property.json" 8 | } -------------------------------------------------------------------------------- /dev/defs/animation/transition_bool_condition.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "TransitionBoolCondition", 3 | "key": { 4 | "int": 71, 5 | "string": "transitionboolcondition" 6 | }, 7 | "extends": "animation/transition_value_condition.json" 8 | } -------------------------------------------------------------------------------- /dev/defs/constraints/translation_constraint.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "TranslationConstraint", 3 | "key": { 4 | "int": 87, 5 | "string": "translationconstraint" 6 | }, 7 | "extends": "constraints/transform_component_constraint_y.json" 8 | } -------------------------------------------------------------------------------- /dev/defs/animation/cubic_ease_interpolator.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "CubicEaseInterpolator", 3 | "key": { 4 | "int": 28, 5 | "string": "cubicEase" 6 | }, 7 | "exportsWithContext": true, 8 | "extends": "animation/cubic_interpolator.json" 9 | } -------------------------------------------------------------------------------- /dev/defs/data_bind/converters/data_converter_to_string.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "DataConverterToString", 3 | "key": { 4 | "int": 490, 5 | "string": "dataconvertertostring" 6 | }, 7 | "extends": "data_bind/converters/data_converter.json" 8 | } -------------------------------------------------------------------------------- /include/rive/transform_space.hpp: -------------------------------------------------------------------------------- 1 | #ifndef _RIVE_TRANSFORM_SPACE_HPP_ 2 | #define _RIVE_TRANSFORM_SPACE_HPP_ 3 | namespace rive 4 | { 5 | enum class TransformSpace : unsigned int 6 | { 7 | world = 0, 8 | local = 1 9 | }; 10 | } 11 | #endif -------------------------------------------------------------------------------- /dev/defs/animation/transition_trigger_condition.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "TransitionTriggerCondition", 3 | "key": { 4 | "int": 68, 5 | "string": "transitiontriggercondition" 6 | }, 7 | "extends": "animation/transition_input_condition.json" 8 | } -------------------------------------------------------------------------------- /dev/generate_core.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -e 3 | 4 | if [[ ! -f "./bin/core_generator" || "$1" == "build" ]]; then 5 | mkdir -p ./bin 6 | dart compile exe ./core_generator/lib/main.dart -o ./bin/core_generator 7 | fi 8 | ./bin/core_generator -------------------------------------------------------------------------------- /dev/defs/animation/nested_state_machine.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "NestedStateMachine", 3 | "key": { 4 | "int": 95, 5 | "string": "nestedStateMachine" 6 | }, 7 | "extends": "nested_animation.json", 8 | "generic": "animation/state_machine.json" 9 | } -------------------------------------------------------------------------------- /dev/defs/animation/transition_artboard_condition.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "TransitionArtboardCondition", 3 | "key": { 4 | "int": 497, 5 | "string": "transitionartboardcondition" 6 | }, 7 | "extends": "animation/transition_viewmodel_condition.json" 8 | } -------------------------------------------------------------------------------- /dev/defs/shapes/path_vertex.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "PathVertex", 3 | "key": { 4 | "int": 14, 5 | "string": "pathvertex" 6 | }, 7 | "abstract": true, 8 | "extends": "shapes/vertex.json", 9 | "genericPassThrough": "bones/weight.json" 10 | } -------------------------------------------------------------------------------- /include/rive/backboard.hpp: -------------------------------------------------------------------------------- 1 | #ifndef _RIVE_BACKBOARD_HPP_ 2 | #define _RIVE_BACKBOARD_HPP_ 3 | #include "rive/generated/backboard_base.hpp" 4 | namespace rive 5 | { 6 | class Backboard : public BackboardBase 7 | {}; 8 | } // namespace rive 9 | 10 | #endif -------------------------------------------------------------------------------- /include/rive/clip_result.hpp: -------------------------------------------------------------------------------- 1 | #ifndef _RIVE_CLIP_RESULT_HPP_ 2 | #define _RIVE_CLIP_RESULT_HPP_ 3 | namespace rive 4 | { 5 | enum class ClipResult : unsigned char 6 | { 7 | noClip = 0, 8 | clip = 1, 9 | emptyClip = 2 10 | }; 11 | } 12 | #endif -------------------------------------------------------------------------------- /src/core/field_types/core_bool_type.cpp: -------------------------------------------------------------------------------- 1 | #include "rive/core/field_types/core_bool_type.hpp" 2 | #include "rive/core/binary_reader.hpp" 3 | 4 | using namespace rive; 5 | 6 | bool CoreBoolType::deserialize(BinaryReader& reader) { return reader.readByte() == 1; } -------------------------------------------------------------------------------- /src/core/field_types/core_color_type.cpp: -------------------------------------------------------------------------------- 1 | #include "rive/core/field_types/core_color_type.hpp" 2 | #include "rive/core/binary_reader.hpp" 3 | 4 | using namespace rive; 5 | 6 | int CoreColorType::deserialize(BinaryReader& reader) { return reader.readUint32(); } -------------------------------------------------------------------------------- /dev/defs/animation/blend_state_direct.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "BlendStateDirect", 3 | "key": { 4 | "int": 73, 5 | "string": "blendstatedirect" 6 | }, 7 | "extends": "animation/blend_state.json", 8 | "generic": "animation/blend_animation_direct.json" 9 | } -------------------------------------------------------------------------------- /dev/defs/shapes/cubic_vertex.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "CubicVertex", 3 | "key": { 4 | "int": 36, 5 | "string": "cubicvertex" 6 | }, 7 | "abstract": true, 8 | "extends": "shapes/path_vertex.json", 9 | "generic": "bones/cubic_weight.json" 10 | } -------------------------------------------------------------------------------- /include/rive/hit_result.hpp: -------------------------------------------------------------------------------- 1 | #ifndef _RIVE_HIT_RESULT_HPP_ 2 | #define _RIVE_HIT_RESULT_HPP_ 3 | 4 | namespace rive 5 | { 6 | enum class HitResult : uint8_t 7 | { 8 | none, 9 | hit, 10 | hitOpaque, 11 | }; 12 | } // namespace rive 13 | #endif 14 | -------------------------------------------------------------------------------- /src/animation/cubic_interpolator.cpp: -------------------------------------------------------------------------------- 1 | #include "rive/animation/cubic_interpolator.hpp" 2 | 3 | using namespace rive; 4 | 5 | StatusCode CubicInterpolator::onAddedDirty(CoreContext* context) 6 | { 7 | m_solver.build(x1(), x2()); 8 | return StatusCode::Ok; 9 | } -------------------------------------------------------------------------------- /src/core/field_types/core_double_type.cpp: -------------------------------------------------------------------------------- 1 | #include "rive/core/field_types/core_double_type.hpp" 2 | #include "rive/core/binary_reader.hpp" 3 | 4 | using namespace rive; 5 | 6 | float CoreDoubleType::deserialize(BinaryReader& reader) { return reader.readFloat32(); } -------------------------------------------------------------------------------- /dev/defs/animation/cubic_value_interpolator.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "CubicValueInterpolator", 3 | "key": { 4 | "int": 138, 5 | "string": "cubicvalueinterpolator" 6 | }, 7 | "exportsWithContext": true, 8 | "extends": "animation/cubic_interpolator.json" 9 | } -------------------------------------------------------------------------------- /dev/defs/animation/transition_value_comparator.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "TransitionValueComparator", 3 | "key": { 4 | "int": 480, 5 | "string": "transitionvaluecomparator" 6 | }, 7 | "abstract": true, 8 | "extends": "animation/transition_comparator.json" 9 | } -------------------------------------------------------------------------------- /src/core/field_types/core_string_type.cpp: -------------------------------------------------------------------------------- 1 | #include "rive/core/field_types/core_string_type.hpp" 2 | #include "rive/core/binary_reader.hpp" 3 | 4 | using namespace rive; 5 | 6 | std::string CoreStringType::deserialize(BinaryReader& reader) { return reader.readString(); } -------------------------------------------------------------------------------- /dev/defs/animation/state_machine_input_folder.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "StateMachineInputFolder", 3 | "key": { 4 | "int": 149, 5 | "string": "statemachineinputfolder" 6 | }, 7 | "extends": "animation/state_machine_component_folder.json", 8 | "runtime": false 9 | } -------------------------------------------------------------------------------- /include/rive/draw_target_placement.hpp: -------------------------------------------------------------------------------- 1 | #ifndef _RIVE_DRAW_TARGET_PLACEMENT_HPP_ 2 | #define _RIVE_DRAW_TARGET_PLACEMENT_HPP_ 3 | namespace rive 4 | { 5 | enum class DrawTargetPlacement : unsigned char 6 | { 7 | before = 0, 8 | after = 1 9 | }; 10 | } 11 | #endif -------------------------------------------------------------------------------- /src/core/field_types/core_bytes_type.cpp: -------------------------------------------------------------------------------- 1 | #include "rive/core/field_types/core_bytes_type.hpp" 2 | #include "rive/core/binary_reader.hpp" 3 | 4 | using namespace rive; 5 | 6 | Span CoreBytesType::deserialize(BinaryReader& reader) { return reader.readBytes(); } -------------------------------------------------------------------------------- /test/main_test.cpp: -------------------------------------------------------------------------------- 1 | // The only purpose of this file is to DEFINE the catch config so it can include 2 | // main() 3 | 4 | #define CATCH_CONFIG_MAIN // This tells Catch to provide a main() - only do this 5 | // in one cpp file 6 | #include -------------------------------------------------------------------------------- /dev/defs/animation/state_machine_component_folder.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "StateMachineComponentFolder", 3 | "key": { 4 | "int": 151, 5 | "string": "statemachinecomponentfolder" 6 | }, 7 | "extends": "animation/state_machine_component.json", 8 | "runtime": false 9 | } -------------------------------------------------------------------------------- /dev/defs/animation/transition_property_comparator.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "TransitionPropertyComparator", 3 | "key": { 4 | "int": 478, 5 | "string": "transitionpropertycomparator" 6 | }, 7 | "abstract": true, 8 | "extends": "animation/transition_comparator.json" 9 | } -------------------------------------------------------------------------------- /include/rive/animation/animation.hpp: -------------------------------------------------------------------------------- 1 | #ifndef _RIVE_ANIMATION_HPP_ 2 | #define _RIVE_ANIMATION_HPP_ 3 | #include "rive/generated/animation/animation_base.hpp" 4 | namespace rive 5 | { 6 | class Animation : public AnimationBase 7 | {}; 8 | } // namespace rive 9 | 10 | #endif -------------------------------------------------------------------------------- /include/rive/animation/easing.hpp: -------------------------------------------------------------------------------- 1 | #ifndef _RIVE_EASING_HPP_ 2 | #define _RIVE_EASING_HPP_ 3 | #include 4 | 5 | namespace rive 6 | { 7 | enum class Easing : uint8_t 8 | { 9 | easeIn = 0, 10 | easeOut = 1, 11 | easeInOut = 2 12 | }; 13 | } 14 | #endif -------------------------------------------------------------------------------- /include/rive/gesture_click_phase.hpp: -------------------------------------------------------------------------------- 1 | #ifndef _RIVE_GESTURE_CLICK_PHASE_HPP_ 2 | #define _RIVE_GESTURE_CLICK_PHASE_HPP_ 3 | namespace rive 4 | { 5 | enum class GestureClickPhase : int 6 | { 7 | out = 0, 8 | down = 1, 9 | clicked = 2, 10 | }; 11 | } 12 | #endif -------------------------------------------------------------------------------- /src/generated/node_base.cpp: -------------------------------------------------------------------------------- 1 | #include "rive/generated/node_base.hpp" 2 | #include "rive/node.hpp" 3 | 4 | using namespace rive; 5 | 6 | Core* NodeBase::clone() const 7 | { 8 | auto cloned = new Node(); 9 | cloned->copy(*this); 10 | return cloned; 11 | } 12 | -------------------------------------------------------------------------------- /src/generated/solo_base.cpp: -------------------------------------------------------------------------------- 1 | #include "rive/generated/solo_base.hpp" 2 | #include "rive/solo.hpp" 3 | 4 | using namespace rive; 5 | 6 | Core* SoloBase::clone() const 7 | { 8 | auto cloned = new Solo(); 9 | cloned->copy(*this); 10 | return cloned; 11 | } 12 | -------------------------------------------------------------------------------- /tess/test/main_test.cpp: -------------------------------------------------------------------------------- 1 | // The only purpose of this file is to DEFINE the catch config so it can include 2 | // main() 3 | 4 | #define CATCH_CONFIG_MAIN // This tells Catch to provide a main() - only do this 5 | // in one cpp file 6 | #include -------------------------------------------------------------------------------- /dev/defs/animation/state_machine_listener_folder.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "StateMachineListenerFolder", 3 | "key": { 4 | "int": 150, 5 | "string": "statemachinelistenerfolder" 6 | }, 7 | "extends": "animation/state_machine_component_folder.json", 8 | "runtime": false 9 | } -------------------------------------------------------------------------------- /src/generated/event_base.cpp: -------------------------------------------------------------------------------- 1 | #include "rive/generated/event_base.hpp" 2 | #include "rive/event.hpp" 3 | 4 | using namespace rive; 5 | 6 | Core* EventBase::clone() const 7 | { 8 | auto cloned = new Event(); 9 | cloned->copy(*this); 10 | return cloned; 11 | } 12 | -------------------------------------------------------------------------------- /include/rive/layout/axis.hpp: -------------------------------------------------------------------------------- 1 | #ifndef _RIVE_AXIS_HPP_ 2 | #define _RIVE_AXIS_HPP_ 3 | #include "rive/generated/layout/axis_base.hpp" 4 | #include 5 | namespace rive 6 | { 7 | class Axis : public AxisBase 8 | { 9 | public: 10 | }; 11 | } // namespace rive 12 | 13 | #endif -------------------------------------------------------------------------------- /include/rive/assets/asset.hpp: -------------------------------------------------------------------------------- 1 | #ifndef _RIVE_ASSET_HPP_ 2 | #define _RIVE_ASSET_HPP_ 3 | #include "rive/generated/assets/asset_base.hpp" 4 | #include 5 | namespace rive 6 | { 7 | class Asset : public AssetBase 8 | { 9 | public: 10 | }; 11 | } // namespace rive 12 | 13 | #endif -------------------------------------------------------------------------------- /include/rive/layout/layout_measure_mode.hpp: -------------------------------------------------------------------------------- 1 | #ifndef _RIVE_LAYOUT_MEASURE_MODE_HPP_ 2 | #define _RIVE_LAYOUT_MEASURE_MODE_HPP_ 3 | namespace rive 4 | { 5 | enum class LayoutMeasureMode : uint8_t 6 | { 7 | undefined = 0, 8 | exactly = 1, 9 | atMost = 2 10 | }; 11 | } 12 | #endif -------------------------------------------------------------------------------- /src/generated/bones/bone_base.cpp: -------------------------------------------------------------------------------- 1 | #include "rive/generated/bones/bone_base.hpp" 2 | #include "rive/bones/bone.hpp" 3 | 4 | using namespace rive; 5 | 6 | Core* BoneBase::clone() const 7 | { 8 | auto cloned = new Bone(); 9 | cloned->copy(*this); 10 | return cloned; 11 | } 12 | -------------------------------------------------------------------------------- /src/generated/bones/skin_base.cpp: -------------------------------------------------------------------------------- 1 | #include "rive/generated/bones/skin_base.hpp" 2 | #include "rive/bones/skin.hpp" 3 | 4 | using namespace rive; 5 | 6 | Core* SkinBase::clone() const 7 | { 8 | auto cloned = new Skin(); 9 | cloned->copy(*this); 10 | return cloned; 11 | } 12 | -------------------------------------------------------------------------------- /src/generated/text/text_base.cpp: -------------------------------------------------------------------------------- 1 | #include "rive/generated/text/text_base.hpp" 2 | #include "rive/text/text.hpp" 3 | 4 | using namespace rive; 5 | 6 | Core* TextBase::clone() const 7 | { 8 | auto cloned = new Text(); 9 | cloned->copy(*this); 10 | return cloned; 11 | } 12 | -------------------------------------------------------------------------------- /include/rive/assets/folder.hpp: -------------------------------------------------------------------------------- 1 | #ifndef _RIVE_FOLDER_HPP_ 2 | #define _RIVE_FOLDER_HPP_ 3 | #include "rive/generated/assets/folder_base.hpp" 4 | #include 5 | namespace rive 6 | { 7 | class Folder : public FolderBase 8 | { 9 | public: 10 | }; 11 | } // namespace rive 12 | 13 | #endif -------------------------------------------------------------------------------- /include/rive/layout/axis_x.hpp: -------------------------------------------------------------------------------- 1 | #ifndef _RIVE_AXIS_X_HPP_ 2 | #define _RIVE_AXIS_X_HPP_ 3 | #include "rive/generated/layout/axis_x_base.hpp" 4 | #include 5 | namespace rive 6 | { 7 | class AxisX : public AxisXBase 8 | { 9 | public: 10 | }; 11 | } // namespace rive 12 | 13 | #endif -------------------------------------------------------------------------------- /include/rive/layout/axis_y.hpp: -------------------------------------------------------------------------------- 1 | #ifndef _RIVE_AXIS_Y_HPP_ 2 | #define _RIVE_AXIS_Y_HPP_ 3 | #include "rive/generated/layout/axis_y_base.hpp" 4 | #include 5 | namespace rive 6 | { 7 | class AxisY : public AxisYBase 8 | { 9 | public: 10 | }; 11 | } // namespace rive 12 | 13 | #endif -------------------------------------------------------------------------------- /src/generated/artboard_base.cpp: -------------------------------------------------------------------------------- 1 | #include "rive/generated/artboard_base.hpp" 2 | #include "rive/artboard.hpp" 3 | 4 | using namespace rive; 5 | 6 | Core* ArtboardBase::clone() const 7 | { 8 | auto cloned = new Artboard(); 9 | cloned->copy(*this); 10 | return cloned; 11 | } 12 | -------------------------------------------------------------------------------- /src/generated/joystick_base.cpp: -------------------------------------------------------------------------------- 1 | #include "rive/generated/joystick_base.hpp" 2 | #include "rive/joystick.hpp" 3 | 4 | using namespace rive; 5 | 6 | Core* JoystickBase::clone() const 7 | { 8 | auto cloned = new Joystick(); 9 | cloned->copy(*this); 10 | return cloned; 11 | } 12 | -------------------------------------------------------------------------------- /src/generated/shapes/mesh_base.cpp: -------------------------------------------------------------------------------- 1 | #include "rive/generated/shapes/mesh_base.hpp" 2 | #include "rive/shapes/mesh.hpp" 3 | 4 | using namespace rive; 5 | 6 | Core* MeshBase::clone() const 7 | { 8 | auto cloned = new Mesh(); 9 | cloned->copy(*this); 10 | return cloned; 11 | } 12 | -------------------------------------------------------------------------------- /src/generated/shapes/star_base.cpp: -------------------------------------------------------------------------------- 1 | #include "rive/generated/shapes/star_base.hpp" 2 | #include "rive/shapes/star.hpp" 3 | 4 | using namespace rive; 5 | 6 | Core* StarBase::clone() const 7 | { 8 | auto cloned = new Star(); 9 | cloned->copy(*this); 10 | return cloned; 11 | } 12 | -------------------------------------------------------------------------------- /include/rive/audio/audio_format.hpp: -------------------------------------------------------------------------------- 1 | #ifndef _RIVE_AUDIO_FORMAT_HPP_ 2 | #define _RIVE_AUDIO_FORMAT_HPP_ 3 | namespace rive 4 | { 5 | enum class AudioFormat : unsigned int 6 | { 7 | unknown = 0, 8 | wav, 9 | flac, 10 | mp3, 11 | vorbis, 12 | buffered 13 | }; 14 | } 15 | #endif -------------------------------------------------------------------------------- /src/generated/backboard_base.cpp: -------------------------------------------------------------------------------- 1 | #include "rive/generated/backboard_base.hpp" 2 | #include "rive/backboard.hpp" 3 | 4 | using namespace rive; 5 | 6 | Core* BackboardBase::clone() const 7 | { 8 | auto cloned = new Backboard(); 9 | cloned->copy(*this); 10 | return cloned; 11 | } 12 | -------------------------------------------------------------------------------- /src/generated/bones/tendon_base.cpp: -------------------------------------------------------------------------------- 1 | #include "rive/generated/bones/tendon_base.hpp" 2 | #include "rive/bones/tendon.hpp" 3 | 4 | using namespace rive; 5 | 6 | Core* TendonBase::clone() const 7 | { 8 | auto cloned = new Tendon(); 9 | cloned->copy(*this); 10 | return cloned; 11 | } 12 | -------------------------------------------------------------------------------- /src/generated/bones/weight_base.cpp: -------------------------------------------------------------------------------- 1 | #include "rive/generated/bones/weight_base.hpp" 2 | #include "rive/bones/weight.hpp" 3 | 4 | using namespace rive; 5 | 6 | Core* WeightBase::clone() const 7 | { 8 | auto cloned = new Weight(); 9 | cloned->copy(*this); 10 | return cloned; 11 | } 12 | -------------------------------------------------------------------------------- /src/generated/draw_rules_base.cpp: -------------------------------------------------------------------------------- 1 | #include "rive/generated/draw_rules_base.hpp" 2 | #include "rive/draw_rules.hpp" 3 | 4 | using namespace rive; 5 | 6 | Core* DrawRulesBase::clone() const 7 | { 8 | auto cloned = new DrawRules(); 9 | cloned->copy(*this); 10 | return cloned; 11 | } 12 | -------------------------------------------------------------------------------- /src/generated/shapes/image_base.cpp: -------------------------------------------------------------------------------- 1 | #include "rive/generated/shapes/image_base.hpp" 2 | #include "rive/shapes/image.hpp" 3 | 4 | using namespace rive; 5 | 6 | Core* ImageBase::clone() const 7 | { 8 | auto cloned = new Image(); 9 | cloned->copy(*this); 10 | return cloned; 11 | } 12 | -------------------------------------------------------------------------------- /src/generated/shapes/shape_base.cpp: -------------------------------------------------------------------------------- 1 | #include "rive/generated/shapes/shape_base.hpp" 2 | #include "rive/shapes/shape.hpp" 3 | 4 | using namespace rive; 5 | 6 | Core* ShapeBase::clone() const 7 | { 8 | auto cloned = new Shape(); 9 | cloned->copy(*this); 10 | return cloned; 11 | } 12 | -------------------------------------------------------------------------------- /include/rive/layout/n_slicer.hpp: -------------------------------------------------------------------------------- 1 | #ifndef _RIVE_N_SLICER_HPP_ 2 | #define _RIVE_N_SLICER_HPP_ 3 | #include "rive/generated/layout/n_slicer_base.hpp" 4 | #include 5 | namespace rive 6 | { 7 | class NSlicer : public NSlicerBase 8 | { 9 | public: 10 | }; 11 | } // namespace rive 12 | 13 | #endif -------------------------------------------------------------------------------- /src/generated/assets/folder_base.cpp: -------------------------------------------------------------------------------- 1 | #include "rive/generated/assets/folder_base.hpp" 2 | #include "rive/assets/folder.hpp" 3 | 4 | using namespace rive; 5 | 6 | Core* FolderBase::clone() const 7 | { 8 | auto cloned = new Folder(); 9 | cloned->copy(*this); 10 | return cloned; 11 | } 12 | -------------------------------------------------------------------------------- /src/generated/audio_event_base.cpp: -------------------------------------------------------------------------------- 1 | #include "rive/generated/audio_event_base.hpp" 2 | #include "rive/audio_event.hpp" 3 | 4 | using namespace rive; 5 | 6 | Core* AudioEventBase::clone() const 7 | { 8 | auto cloned = new AudioEvent(); 9 | cloned->copy(*this); 10 | return cloned; 11 | } 12 | -------------------------------------------------------------------------------- /src/generated/draw_target_base.cpp: -------------------------------------------------------------------------------- 1 | #include "rive/generated/draw_target_base.hpp" 2 | #include "rive/draw_target.hpp" 3 | 4 | using namespace rive; 5 | 6 | Core* DrawTargetBase::clone() const 7 | { 8 | auto cloned = new DrawTarget(); 9 | cloned->copy(*this); 10 | return cloned; 11 | } 12 | -------------------------------------------------------------------------------- /src/generated/layout/axis_x_base.cpp: -------------------------------------------------------------------------------- 1 | #include "rive/generated/layout/axis_x_base.hpp" 2 | #include "rive/layout/axis_x.hpp" 3 | 4 | using namespace rive; 5 | 6 | Core* AxisXBase::clone() const 7 | { 8 | auto cloned = new AxisX(); 9 | cloned->copy(*this); 10 | return cloned; 11 | } 12 | -------------------------------------------------------------------------------- /src/generated/layout/axis_y_base.cpp: -------------------------------------------------------------------------------- 1 | #include "rive/generated/layout/axis_y_base.hpp" 2 | #include "rive/layout/axis_y.hpp" 3 | 4 | using namespace rive; 5 | 6 | Core* AxisYBase::clone() const 7 | { 8 | auto cloned = new AxisY(); 9 | cloned->copy(*this); 10 | return cloned; 11 | } 12 | -------------------------------------------------------------------------------- /include/rive/animation/artboard_property.hpp: -------------------------------------------------------------------------------- 1 | #ifndef _RIVE_ARTBOARD_PROPERTY_HPP_ 2 | #define _RIVE_ARTBOARD_PROPERTY_HPP_ 3 | 4 | namespace rive 5 | { 6 | enum class ArtboardProperty : int 7 | { 8 | width = 0, 9 | height = 1, 10 | ratio = 2, 11 | }; 12 | } // namespace rive 13 | 14 | #endif -------------------------------------------------------------------------------- /src/animation/blend_animation_1d.cpp: -------------------------------------------------------------------------------- 1 | #include "rive/animation/blend_animation_1d.hpp" 2 | 3 | using namespace rive; 4 | 5 | StatusCode BlendAnimation1D::onAddedDirty(CoreContext* context) { return StatusCode::Ok; } 6 | 7 | StatusCode BlendAnimation1D::onAddedClean(CoreContext* context) { return StatusCode::Ok; } -------------------------------------------------------------------------------- /src/core/field_types/core_uint_type.cpp: -------------------------------------------------------------------------------- 1 | #include "rive/core/field_types/core_uint_type.hpp" 2 | #include "rive/core/binary_reader.hpp" 3 | 4 | using namespace rive; 5 | 6 | unsigned int CoreUintType::deserialize(BinaryReader& reader) 7 | { 8 | return reader.readVarUintAs(); 9 | } 10 | -------------------------------------------------------------------------------- /src/generated/shapes/ellipse_base.cpp: -------------------------------------------------------------------------------- 1 | #include "rive/generated/shapes/ellipse_base.hpp" 2 | #include "rive/shapes/ellipse.hpp" 3 | 4 | using namespace rive; 5 | 6 | Core* EllipseBase::clone() const 7 | { 8 | auto cloned = new Ellipse(); 9 | cloned->copy(*this); 10 | return cloned; 11 | } 12 | -------------------------------------------------------------------------------- /src/generated/shapes/polygon_base.cpp: -------------------------------------------------------------------------------- 1 | #include "rive/generated/shapes/polygon_base.hpp" 2 | #include "rive/shapes/polygon.hpp" 3 | 4 | using namespace rive; 5 | 6 | Core* PolygonBase::clone() const 7 | { 8 | auto cloned = new Polygon(); 9 | cloned->copy(*this); 10 | return cloned; 11 | } 12 | -------------------------------------------------------------------------------- /include/rive/animation/any_state.hpp: -------------------------------------------------------------------------------- 1 | #ifndef _RIVE_ANY_STATE_HPP_ 2 | #define _RIVE_ANY_STATE_HPP_ 3 | #include "rive/generated/animation/any_state_base.hpp" 4 | #include 5 | namespace rive 6 | { 7 | class AnyState : public AnyStateBase 8 | { 9 | public: 10 | }; 11 | } // namespace rive 12 | 13 | #endif -------------------------------------------------------------------------------- /include/rive/event.hpp: -------------------------------------------------------------------------------- 1 | #ifndef _RIVE_EVENT_HPP_ 2 | #define _RIVE_EVENT_HPP_ 3 | #include "rive/generated/event_base.hpp" 4 | 5 | namespace rive 6 | { 7 | class Event : public EventBase 8 | { 9 | public: 10 | void trigger(const CallbackData& value) override; 11 | }; 12 | } // namespace rive 13 | 14 | #endif -------------------------------------------------------------------------------- /src/generated/bones/root_bone_base.cpp: -------------------------------------------------------------------------------- 1 | #include "rive/generated/bones/root_bone_base.hpp" 2 | #include "rive/bones/root_bone.hpp" 3 | 4 | using namespace rive; 5 | 6 | Core* RootBoneBase::clone() const 7 | { 8 | auto cloned = new RootBone(); 9 | cloned->copy(*this); 10 | return cloned; 11 | } 12 | -------------------------------------------------------------------------------- /src/generated/layout/n_slicer_base.cpp: -------------------------------------------------------------------------------- 1 | #include "rive/generated/layout/n_slicer_base.hpp" 2 | #include "rive/layout/n_slicer.hpp" 3 | 4 | using namespace rive; 5 | 6 | Core* NSlicerBase::clone() const 7 | { 8 | auto cloned = new NSlicer(); 9 | cloned->copy(*this); 10 | return cloned; 11 | } 12 | -------------------------------------------------------------------------------- /src/generated/shapes/paint/fill_base.cpp: -------------------------------------------------------------------------------- 1 | #include "rive/generated/shapes/paint/fill_base.hpp" 2 | #include "rive/shapes/paint/fill.hpp" 3 | 4 | using namespace rive; 5 | 6 | Core* FillBase::clone() const 7 | { 8 | auto cloned = new Fill(); 9 | cloned->copy(*this); 10 | return cloned; 11 | } 12 | -------------------------------------------------------------------------------- /src/generated/shapes/triangle_base.cpp: -------------------------------------------------------------------------------- 1 | #include "rive/generated/shapes/triangle_base.hpp" 2 | #include "rive/shapes/triangle.hpp" 3 | 4 | using namespace rive; 5 | 6 | Core* TriangleBase::clone() const 7 | { 8 | auto cloned = new Triangle(); 9 | cloned->copy(*this); 10 | return cloned; 11 | } 12 | -------------------------------------------------------------------------------- /src/generated/text/text_style_base.cpp: -------------------------------------------------------------------------------- 1 | #include "rive/generated/text/text_style_base.hpp" 2 | #include "rive/text/text_style.hpp" 3 | 4 | using namespace rive; 5 | 6 | Core* TextStyleBase::clone() const 7 | { 8 | auto cloned = new TextStyle(); 9 | cloned->copy(*this); 10 | return cloned; 11 | } 12 | -------------------------------------------------------------------------------- /src/animation/state_instance.cpp: -------------------------------------------------------------------------------- 1 | #include "rive/animation/state_instance.hpp" 2 | using namespace rive; 3 | 4 | StateInstance::StateInstance(const LayerState* layerState) : m_LayerState(layerState) {} 5 | 6 | StateInstance::~StateInstance() {} 7 | 8 | const LayerState* StateInstance::state() const { return m_LayerState; } -------------------------------------------------------------------------------- /src/generated/open_url_event_base.cpp: -------------------------------------------------------------------------------- 1 | #include "rive/generated/open_url_event_base.hpp" 2 | #include "rive/open_url_event.hpp" 3 | 4 | using namespace rive; 5 | 6 | Core* OpenUrlEventBase::clone() const 7 | { 8 | auto cloned = new OpenUrlEvent(); 9 | cloned->copy(*this); 10 | return cloned; 11 | } 12 | -------------------------------------------------------------------------------- /src/generated/shapes/rectangle_base.cpp: -------------------------------------------------------------------------------- 1 | #include "rive/generated/shapes/rectangle_base.hpp" 2 | #include "rive/shapes/rectangle.hpp" 3 | 4 | using namespace rive; 5 | 6 | Core* RectangleBase::clone() const 7 | { 8 | auto cloned = new Rectangle(); 9 | cloned->copy(*this); 10 | return cloned; 11 | } 12 | -------------------------------------------------------------------------------- /tess/src/sub_path.cpp: -------------------------------------------------------------------------------- 1 | #include "rive/tess/sub_path.hpp" 2 | 3 | using namespace rive; 4 | 5 | SubPath::SubPath(RenderPath* path, const Mat2D& transform) : m_Path(path), m_Transform(transform) {} 6 | 7 | RenderPath* SubPath::path() const { return m_Path; } 8 | const Mat2D& SubPath::transform() const { return m_Transform; } -------------------------------------------------------------------------------- /dev/core_generator/lib/src/field_types/bool_field_type.dart: -------------------------------------------------------------------------------- 1 | import '../field_type.dart'; 2 | 3 | class BoolFieldType extends FieldType { 4 | BoolFieldType() 5 | : super( 6 | 'bool', 7 | 'CoreBoolType', 8 | ); 9 | 10 | @override 11 | String get defaultValue => 'false'; 12 | } 13 | -------------------------------------------------------------------------------- /include/rive/animation/exit_state.hpp: -------------------------------------------------------------------------------- 1 | #ifndef _RIVE_EXIT_STATE_HPP_ 2 | #define _RIVE_EXIT_STATE_HPP_ 3 | #include "rive/generated/animation/exit_state_base.hpp" 4 | #include 5 | namespace rive 6 | { 7 | class ExitState : public ExitStateBase 8 | { 9 | public: 10 | }; 11 | } // namespace rive 12 | 13 | #endif -------------------------------------------------------------------------------- /include/rive/listener_type.hpp: -------------------------------------------------------------------------------- 1 | #ifndef _RIVE_LISTENER_TYPE_HPP_ 2 | #define _RIVE_LISTENER_TYPE_HPP_ 3 | namespace rive 4 | { 5 | enum class ListenerType : int 6 | { 7 | enter = 0, 8 | exit = 1, 9 | down = 2, 10 | up = 3, 11 | move = 4, 12 | event = 5, 13 | click = 6, 14 | }; 15 | } 16 | #endif -------------------------------------------------------------------------------- /include/rive/open_url_event.hpp: -------------------------------------------------------------------------------- 1 | #ifndef _RIVE_OPEN_URL_EVENT_HPP_ 2 | #define _RIVE_OPEN_URL_EVENT_HPP_ 3 | #include "rive/generated/open_url_event_base.hpp" 4 | #include 5 | namespace rive 6 | { 7 | class OpenUrlEvent : public OpenUrlEventBase 8 | { 9 | public: 10 | }; 11 | } // namespace rive 12 | 13 | #endif -------------------------------------------------------------------------------- /src/generated/animation/any_state_base.cpp: -------------------------------------------------------------------------------- 1 | #include "rive/generated/animation/any_state_base.hpp" 2 | #include "rive/animation/any_state.hpp" 3 | 4 | using namespace rive; 5 | 6 | Core* AnyStateBase::clone() const 7 | { 8 | auto cloned = new AnyState(); 9 | cloned->copy(*this); 10 | return cloned; 11 | } 12 | -------------------------------------------------------------------------------- /src/generated/assets/font_asset_base.cpp: -------------------------------------------------------------------------------- 1 | #include "rive/generated/assets/font_asset_base.hpp" 2 | #include "rive/assets/font_asset.hpp" 3 | 4 | using namespace rive; 5 | 6 | Core* FontAssetBase::clone() const 7 | { 8 | auto cloned = new FontAsset(); 9 | cloned->copy(*this); 10 | return cloned; 11 | } 12 | -------------------------------------------------------------------------------- /src/generated/data_bind/data_bind_base.cpp: -------------------------------------------------------------------------------- 1 | #include "rive/generated/data_bind/data_bind_base.hpp" 2 | #include "rive/data_bind/data_bind.hpp" 3 | 4 | using namespace rive; 5 | 6 | Core* DataBindBase::clone() const 7 | { 8 | auto cloned = new DataBind(); 9 | cloned->copy(*this); 10 | return cloned; 11 | } 12 | -------------------------------------------------------------------------------- /src/generated/nested_artboard_base.cpp: -------------------------------------------------------------------------------- 1 | #include "rive/generated/nested_artboard_base.hpp" 2 | #include "rive/nested_artboard.hpp" 3 | 4 | using namespace rive; 5 | 6 | Core* NestedArtboardBase::clone() const 7 | { 8 | auto cloned = new NestedArtboard(); 9 | cloned->copy(*this); 10 | return cloned; 11 | } 12 | -------------------------------------------------------------------------------- /src/generated/shapes/paint/stroke_base.cpp: -------------------------------------------------------------------------------- 1 | #include "rive/generated/shapes/paint/stroke_base.hpp" 2 | #include "rive/shapes/paint/stroke.hpp" 3 | 4 | using namespace rive; 5 | 6 | Core* StrokeBase::clone() const 7 | { 8 | auto cloned = new Stroke(); 9 | cloned->copy(*this); 10 | return cloned; 11 | } 12 | -------------------------------------------------------------------------------- /src/generated/viewmodel/data_enum_base.cpp: -------------------------------------------------------------------------------- 1 | #include "rive/generated/viewmodel/data_enum_base.hpp" 2 | #include "rive/viewmodel/data_enum.hpp" 3 | 4 | using namespace rive; 5 | 6 | Core* DataEnumBase::clone() const 7 | { 8 | auto cloned = new DataEnum(); 9 | cloned->copy(*this); 10 | return cloned; 11 | } 12 | -------------------------------------------------------------------------------- /include/rive/animation/entry_state.hpp: -------------------------------------------------------------------------------- 1 | #ifndef _RIVE_ENTRY_STATE_HPP_ 2 | #define _RIVE_ENTRY_STATE_HPP_ 3 | #include "rive/generated/animation/entry_state_base.hpp" 4 | #include 5 | namespace rive 6 | { 7 | class EntryState : public EntryStateBase 8 | { 9 | public: 10 | }; 11 | } // namespace rive 12 | 13 | #endif -------------------------------------------------------------------------------- /include/rive/assets/export_audio.hpp: -------------------------------------------------------------------------------- 1 | #ifndef _RIVE_EXPORT_AUDIO_HPP_ 2 | #define _RIVE_EXPORT_AUDIO_HPP_ 3 | #include "rive/generated/assets/export_audio_base.hpp" 4 | #include 5 | namespace rive 6 | { 7 | class ExportAudio : public ExportAudioBase 8 | { 9 | public: 10 | }; 11 | } // namespace rive 12 | 13 | #endif -------------------------------------------------------------------------------- /skia/dependencies/make_imgui.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | set -e 4 | 5 | IMGUI_REPO=https://github.com/ocornut/imgui 6 | IMGUI_STABLE_BRANCH=master 7 | 8 | if [ ! -d imgui ]; then 9 | echo "Cloning ImGui." 10 | git clone $IMGUI_REPO 11 | fi 12 | 13 | cd imgui && git checkout $IMGUI_STABLE_BRANCH && git fetch && git pull 14 | -------------------------------------------------------------------------------- /src/generated/animation/animation_base.cpp: -------------------------------------------------------------------------------- 1 | #include "rive/generated/animation/animation_base.hpp" 2 | #include "rive/animation/animation.hpp" 3 | 4 | using namespace rive; 5 | 6 | Core* AnimationBase::clone() const 7 | { 8 | auto cloned = new Animation(); 9 | cloned->copy(*this); 10 | return cloned; 11 | } 12 | -------------------------------------------------------------------------------- /src/generated/animation/exit_state_base.cpp: -------------------------------------------------------------------------------- 1 | #include "rive/generated/animation/exit_state_base.hpp" 2 | #include "rive/animation/exit_state.hpp" 3 | 4 | using namespace rive; 5 | 6 | Core* ExitStateBase::clone() const 7 | { 8 | auto cloned = new ExitState(); 9 | cloned->copy(*this); 10 | return cloned; 11 | } 12 | -------------------------------------------------------------------------------- /src/generated/assets/audio_asset_base.cpp: -------------------------------------------------------------------------------- 1 | #include "rive/generated/assets/audio_asset_base.hpp" 2 | #include "rive/assets/audio_asset.hpp" 3 | 4 | using namespace rive; 5 | 6 | Core* AudioAssetBase::clone() const 7 | { 8 | auto cloned = new AudioAsset(); 9 | cloned->copy(*this); 10 | return cloned; 11 | } 12 | -------------------------------------------------------------------------------- /src/generated/assets/image_asset_base.cpp: -------------------------------------------------------------------------------- 1 | #include "rive/generated/assets/image_asset_base.hpp" 2 | #include "rive/assets/image_asset.hpp" 3 | 4 | using namespace rive; 5 | 6 | Core* ImageAssetBase::clone() const 7 | { 8 | auto cloned = new ImageAsset(); 9 | cloned->copy(*this); 10 | return cloned; 11 | } 12 | -------------------------------------------------------------------------------- /src/generated/bones/cubic_weight_base.cpp: -------------------------------------------------------------------------------- 1 | #include "rive/generated/bones/cubic_weight_base.hpp" 2 | #include "rive/bones/cubic_weight.hpp" 3 | 4 | using namespace rive; 5 | 6 | Core* CubicWeightBase::clone() const 7 | { 8 | auto cloned = new CubicWeight(); 9 | cloned->copy(*this); 10 | return cloned; 11 | } 12 | -------------------------------------------------------------------------------- /src/generated/layout_component_base.cpp: -------------------------------------------------------------------------------- 1 | #include "rive/generated/layout_component_base.hpp" 2 | #include "rive/layout_component.hpp" 3 | 4 | using namespace rive; 5 | 6 | Core* LayoutComponentBase::clone() const 7 | { 8 | auto cloned = new LayoutComponent(); 9 | cloned->copy(*this); 10 | return cloned; 11 | } 12 | -------------------------------------------------------------------------------- /src/generated/shapes/mesh_vertex_base.cpp: -------------------------------------------------------------------------------- 1 | #include "rive/generated/shapes/mesh_vertex_base.hpp" 2 | #include "rive/shapes/mesh_vertex.hpp" 3 | 4 | using namespace rive; 5 | 6 | Core* MeshVertexBase::clone() const 7 | { 8 | auto cloned = new MeshVertex(); 9 | cloned->copy(*this); 10 | return cloned; 11 | } 12 | -------------------------------------------------------------------------------- /src/generated/shapes/points_path_base.cpp: -------------------------------------------------------------------------------- 1 | #include "rive/generated/shapes/points_path_base.hpp" 2 | #include "rive/shapes/points_path.hpp" 3 | 4 | using namespace rive; 5 | 6 | Core* PointsPathBase::clone() const 7 | { 8 | auto cloned = new PointsPath(); 9 | cloned->copy(*this); 10 | return cloned; 11 | } 12 | -------------------------------------------------------------------------------- /src/generated/viewmodel/viewmodel_base.cpp: -------------------------------------------------------------------------------- 1 | #include "rive/generated/viewmodel/viewmodel_base.hpp" 2 | #include "rive/viewmodel/viewmodel.hpp" 3 | 4 | using namespace rive; 5 | 6 | Core* ViewModelBase::clone() const 7 | { 8 | auto cloned = new ViewModel(); 9 | cloned->copy(*this); 10 | return cloned; 11 | } 12 | -------------------------------------------------------------------------------- /include/rive/custom_property.hpp: -------------------------------------------------------------------------------- 1 | #ifndef _RIVE_CUSTOM_PROPERTY_HPP_ 2 | #define _RIVE_CUSTOM_PROPERTY_HPP_ 3 | #include "rive/generated/custom_property_base.hpp" 4 | #include 5 | namespace rive 6 | { 7 | class CustomProperty : public CustomPropertyBase 8 | { 9 | public: 10 | }; 11 | } // namespace rive 12 | 13 | #endif -------------------------------------------------------------------------------- /include/rive/status_code.hpp: -------------------------------------------------------------------------------- 1 | #ifndef _RIVE_STATUS_CODE_HPP_ 2 | #define _RIVE_STATUS_CODE_HPP_ 3 | 4 | #include "rive/rive_types.hpp" 5 | 6 | namespace rive 7 | { 8 | enum class StatusCode : unsigned char 9 | { 10 | Ok, 11 | MissingObject, 12 | InvalidObject, 13 | FailedInversion 14 | }; 15 | } 16 | #endif 17 | -------------------------------------------------------------------------------- /src/generated/animation/entry_state_base.cpp: -------------------------------------------------------------------------------- 1 | #include "rive/generated/animation/entry_state_base.hpp" 2 | #include "rive/animation/entry_state.hpp" 3 | 4 | using namespace rive; 5 | 6 | Core* EntryStateBase::clone() const 7 | { 8 | auto cloned = new EntryState(); 9 | cloned->copy(*this); 10 | return cloned; 11 | } 12 | -------------------------------------------------------------------------------- /src/generated/animation/keyframe_id_base.cpp: -------------------------------------------------------------------------------- 1 | #include "rive/generated/animation/keyframe_id_base.hpp" 2 | #include "rive/animation/keyframe_id.hpp" 3 | 4 | using namespace rive; 5 | 6 | Core* KeyFrameIdBase::clone() const 7 | { 8 | auto cloned = new KeyFrameId(); 9 | cloned->copy(*this); 10 | return cloned; 11 | } 12 | -------------------------------------------------------------------------------- /src/generated/animation/nested_bool_base.cpp: -------------------------------------------------------------------------------- 1 | #include "rive/generated/animation/nested_bool_base.hpp" 2 | #include "rive/animation/nested_bool.hpp" 3 | 4 | using namespace rive; 5 | 6 | Core* NestedBoolBase::clone() const 7 | { 8 | auto cloned = new NestedBool(); 9 | cloned->copy(*this); 10 | return cloned; 11 | } 12 | -------------------------------------------------------------------------------- /src/generated/shapes/paint/trim_path_base.cpp: -------------------------------------------------------------------------------- 1 | #include "rive/generated/shapes/paint/trim_path_base.hpp" 2 | #include "rive/shapes/paint/trim_path.hpp" 3 | 4 | using namespace rive; 5 | 6 | Core* TrimPathBase::clone() const 7 | { 8 | auto cloned = new TrimPath(); 9 | cloned->copy(*this); 10 | return cloned; 11 | } 12 | -------------------------------------------------------------------------------- /src/generated/text/text_value_run_base.cpp: -------------------------------------------------------------------------------- 1 | #include "rive/generated/text/text_value_run_base.hpp" 2 | #include "rive/text/text_value_run.hpp" 3 | 4 | using namespace rive; 5 | 6 | Core* TextValueRunBase::clone() const 7 | { 8 | auto cloned = new TextValueRun(); 9 | cloned->copy(*this); 10 | return cloned; 11 | } 12 | -------------------------------------------------------------------------------- /include/rive/assets/drawable_asset.hpp: -------------------------------------------------------------------------------- 1 | #ifndef _RIVE_DRAWABLE_ASSET_HPP_ 2 | #define _RIVE_DRAWABLE_ASSET_HPP_ 3 | #include "rive/generated/assets/drawable_asset_base.hpp" 4 | #include 5 | namespace rive 6 | { 7 | class DrawableAsset : public DrawableAssetBase 8 | { 9 | public: 10 | }; 11 | } // namespace rive 12 | 13 | #endif -------------------------------------------------------------------------------- /src/generated/animation/keyed_object_base.cpp: -------------------------------------------------------------------------------- 1 | #include "rive/generated/animation/keyed_object_base.hpp" 2 | #include "rive/animation/keyed_object.hpp" 3 | 4 | using namespace rive; 5 | 6 | Core* KeyedObjectBase::clone() const 7 | { 8 | auto cloned = new KeyedObject(); 9 | cloned->copy(*this); 10 | return cloned; 11 | } 12 | -------------------------------------------------------------------------------- /src/generated/text/text_style_axis_base.cpp: -------------------------------------------------------------------------------- 1 | #include "rive/generated/text/text_style_axis_base.hpp" 2 | #include "rive/text/text_style_axis.hpp" 3 | 4 | using namespace rive; 5 | 6 | Core* TextStyleAxisBase::clone() const 7 | { 8 | auto cloned = new TextStyleAxis(); 9 | cloned->copy(*this); 10 | return cloned; 11 | } 12 | -------------------------------------------------------------------------------- /src/viewmodel/viewmodel_instance_color.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | 5 | #include "rive/viewmodel/viewmodel_instance_color.hpp" 6 | #include "rive/component_dirt.hpp" 7 | 8 | using namespace rive; 9 | 10 | void ViewModelInstanceColor::propertyValueChanged() { addDirt(ComponentDirt::Bindings); } -------------------------------------------------------------------------------- /include/rive/math/circle_constant.hpp: -------------------------------------------------------------------------------- 1 | #ifndef _RIVE_CIRCLE_CONSTANT_HPP_ 2 | #define _RIVE_CIRCLE_CONSTANT_HPP_ 3 | 4 | #include "rive/rive_types.hpp" 5 | 6 | namespace rive 7 | { 8 | constexpr float circleConstant = 0.552284749831f; 9 | constexpr float icircleConstant = 1.0f - circleConstant; 10 | } // namespace rive 11 | 12 | #endif 13 | -------------------------------------------------------------------------------- /include/rive/node.hpp: -------------------------------------------------------------------------------- 1 | #ifndef _RIVE_NODE_HPP_ 2 | #define _RIVE_NODE_HPP_ 3 | #include "rive/generated/node_base.hpp" 4 | 5 | namespace rive 6 | { 7 | /// A Rive Node 8 | class Node : public NodeBase 9 | { 10 | protected: 11 | void xChanged() override; 12 | void yChanged() override; 13 | }; 14 | } // namespace rive 15 | 16 | #endif -------------------------------------------------------------------------------- /src/generated/animation/keyframe_bool_base.cpp: -------------------------------------------------------------------------------- 1 | #include "rive/generated/animation/keyframe_bool_base.hpp" 2 | #include "rive/animation/keyframe_bool.hpp" 3 | 4 | using namespace rive; 5 | 6 | Core* KeyFrameBoolBase::clone() const 7 | { 8 | auto cloned = new KeyFrameBool(); 9 | cloned->copy(*this); 10 | return cloned; 11 | } 12 | -------------------------------------------------------------------------------- /src/generated/animation/keyframe_uint_base.cpp: -------------------------------------------------------------------------------- 1 | #include "rive/generated/animation/keyframe_uint_base.hpp" 2 | #include "rive/animation/keyframe_uint.hpp" 3 | 4 | using namespace rive; 5 | 6 | Core* KeyFrameUintBase::clone() const 7 | { 8 | auto cloned = new KeyFrameUint(); 9 | cloned->copy(*this); 10 | return cloned; 11 | } 12 | -------------------------------------------------------------------------------- /src/generated/animation/nested_number_base.cpp: -------------------------------------------------------------------------------- 1 | #include "rive/generated/animation/nested_number_base.hpp" 2 | #include "rive/animation/nested_number.hpp" 3 | 4 | using namespace rive; 5 | 6 | Core* NestedNumberBase::clone() const 7 | { 8 | auto cloned = new NestedNumber(); 9 | cloned->copy(*this); 10 | return cloned; 11 | } 12 | -------------------------------------------------------------------------------- /src/generated/animation/state_machine_base.cpp: -------------------------------------------------------------------------------- 1 | #include "rive/generated/animation/state_machine_base.hpp" 2 | #include "rive/animation/state_machine.hpp" 3 | 4 | using namespace rive; 5 | 6 | Core* StateMachineBase::clone() const 7 | { 8 | auto cloned = new StateMachine(); 9 | cloned->copy(*this); 10 | return cloned; 11 | } 12 | -------------------------------------------------------------------------------- /src/generated/shapes/clipping_shape_base.cpp: -------------------------------------------------------------------------------- 1 | #include "rive/generated/shapes/clipping_shape_base.hpp" 2 | #include "rive/shapes/clipping_shape.hpp" 3 | 4 | using namespace rive; 5 | 6 | Core* ClippingShapeBase::clone() const 7 | { 8 | auto cloned = new ClippingShape(); 9 | cloned->copy(*this); 10 | return cloned; 11 | } 12 | -------------------------------------------------------------------------------- /src/generated/shapes/paint/solid_color_base.cpp: -------------------------------------------------------------------------------- 1 | #include "rive/generated/shapes/paint/solid_color_base.hpp" 2 | #include "rive/shapes/paint/solid_color.hpp" 3 | 4 | using namespace rive; 5 | 6 | Core* SolidColorBase::clone() const 7 | { 8 | auto cloned = new SolidColor(); 9 | cloned->copy(*this); 10 | return cloned; 11 | } 12 | -------------------------------------------------------------------------------- /src/viewmodel/viewmodel_instance_boolean.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | 5 | #include "rive/viewmodel/viewmodel_instance_boolean.hpp" 6 | #include "rive/component_dirt.hpp" 7 | 8 | using namespace rive; 9 | 10 | void ViewModelInstanceBoolean::propertyValueChanged() { addDirt(ComponentDirt::Bindings); } -------------------------------------------------------------------------------- /src/viewmodel/viewmodel_instance_number.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | 5 | #include "rive/viewmodel/viewmodel_instance_number.hpp" 6 | #include "rive/component_dirt.hpp" 7 | 8 | using namespace rive; 9 | 10 | void ViewModelInstanceNumber::propertyValueChanged() { addDirt(ComponentDirt::Bindings); } -------------------------------------------------------------------------------- /src/viewmodel/viewmodel_instance_string.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | 5 | #include "rive/viewmodel/viewmodel_instance_string.hpp" 6 | #include "rive/component_dirt.hpp" 7 | 8 | using namespace rive; 9 | 10 | void ViewModelInstanceString::propertyValueChanged() { addDirt(ComponentDirt::Bindings); } -------------------------------------------------------------------------------- /include/rive/animation/keyframe_callback.hpp: -------------------------------------------------------------------------------- 1 | #ifndef _RIVE_KEY_FRAME_CALLBACK_HPP_ 2 | #define _RIVE_KEY_FRAME_CALLBACK_HPP_ 3 | #include "rive/generated/animation/keyframe_callback_base.hpp" 4 | 5 | namespace rive 6 | { 7 | class KeyFrameCallback : public KeyFrameCallbackBase 8 | { 9 | public: 10 | }; 11 | } // namespace rive 12 | 13 | #endif -------------------------------------------------------------------------------- /include/rive/core/field_types/core_bool_type.hpp: -------------------------------------------------------------------------------- 1 | #ifndef _RIVE_CORE_BOOL_TYPE_HPP_ 2 | #define _RIVE_CORE_BOOL_TYPE_HPP_ 3 | 4 | namespace rive 5 | { 6 | class BinaryReader; 7 | class CoreBoolType 8 | { 9 | public: 10 | static const int id = 0; 11 | static bool deserialize(BinaryReader& reader); 12 | }; 13 | } // namespace rive 14 | #endif -------------------------------------------------------------------------------- /include/rive/shapes/contour_mesh_vertex.hpp: -------------------------------------------------------------------------------- 1 | #ifndef _RIVE_CONTOUR_MESH_VERTEX_HPP_ 2 | #define _RIVE_CONTOUR_MESH_VERTEX_HPP_ 3 | #include "rive/generated/shapes/contour_mesh_vertex_base.hpp" 4 | 5 | namespace rive 6 | { 7 | class ContourMeshVertex : public ContourMeshVertexBase 8 | { 9 | public: 10 | }; 11 | } // namespace rive 12 | 13 | #endif -------------------------------------------------------------------------------- /src/event.cpp: -------------------------------------------------------------------------------- 1 | #include "rive/event.hpp" 2 | #include "rive/animation/state_machine_instance.hpp" 3 | #include "rive/artboard.hpp" 4 | #include "rive/importers/artboard_importer.hpp" 5 | 6 | using namespace rive; 7 | 8 | void Event::trigger(const CallbackData& value) 9 | { 10 | value.context()->reportEvent(this, value.delaySeconds()); 11 | } -------------------------------------------------------------------------------- /src/generated/animation/blend_state_1d_base.cpp: -------------------------------------------------------------------------------- 1 | #include "rive/generated/animation/blend_state_1d_base.hpp" 2 | #include "rive/animation/blend_state_1d.hpp" 3 | 4 | using namespace rive; 5 | 6 | Core* BlendState1DBase::clone() const 7 | { 8 | auto cloned = new BlendState1D(); 9 | cloned->copy(*this); 10 | return cloned; 11 | } 12 | -------------------------------------------------------------------------------- /src/generated/animation/keyed_property_base.cpp: -------------------------------------------------------------------------------- 1 | #include "rive/generated/animation/keyed_property_base.hpp" 2 | #include "rive/animation/keyed_property.hpp" 3 | 4 | using namespace rive; 5 | 6 | Core* KeyedPropertyBase::clone() const 7 | { 8 | auto cloned = new KeyedProperty(); 9 | cloned->copy(*this); 10 | return cloned; 11 | } 12 | -------------------------------------------------------------------------------- /src/generated/animation/keyframe_color_base.cpp: -------------------------------------------------------------------------------- 1 | #include "rive/generated/animation/keyframe_color_base.hpp" 2 | #include "rive/animation/keyframe_color.hpp" 3 | 4 | using namespace rive; 5 | 6 | Core* KeyFrameColorBase::clone() const 7 | { 8 | auto cloned = new KeyFrameColor(); 9 | cloned->copy(*this); 10 | return cloned; 11 | } 12 | -------------------------------------------------------------------------------- /src/generated/animation/nested_trigger_base.cpp: -------------------------------------------------------------------------------- 1 | #include "rive/generated/animation/nested_trigger_base.hpp" 2 | #include "rive/animation/nested_trigger.hpp" 3 | 4 | using namespace rive; 5 | 6 | Core* NestedTriggerBase::clone() const 7 | { 8 | auto cloned = new NestedTrigger(); 9 | cloned->copy(*this); 10 | return cloned; 11 | } 12 | -------------------------------------------------------------------------------- /src/generated/nested_artboard_leaf_base.cpp: -------------------------------------------------------------------------------- 1 | #include "rive/generated/nested_artboard_leaf_base.hpp" 2 | #include "rive/nested_artboard_leaf.hpp" 3 | 4 | using namespace rive; 5 | 6 | Core* NestedArtboardLeafBase::clone() const 7 | { 8 | auto cloned = new NestedArtboardLeaf(); 9 | cloned->copy(*this); 10 | return cloned; 11 | } 12 | -------------------------------------------------------------------------------- /src/generated/shapes/straight_vertex_base.cpp: -------------------------------------------------------------------------------- 1 | #include "rive/generated/shapes/straight_vertex_base.hpp" 2 | #include "rive/shapes/straight_vertex.hpp" 3 | 4 | using namespace rive; 5 | 6 | Core* StraightVertexBase::clone() const 7 | { 8 | auto cloned = new StraightVertex(); 9 | cloned->copy(*this); 10 | return cloned; 11 | } 12 | -------------------------------------------------------------------------------- /dev/core_generator/lib/src/field_types/color_field_type.dart: -------------------------------------------------------------------------------- 1 | import '../field_type.dart'; 2 | 3 | class ColorFieldType extends FieldType { 4 | ColorFieldType() 5 | : super( 6 | 'Color', 7 | 'CoreColorType', 8 | cppName: 'int', 9 | ); 10 | 11 | @override 12 | String get defaultValue => '0'; 13 | } 14 | -------------------------------------------------------------------------------- /include/rive/core/field_types/core_color_type.hpp: -------------------------------------------------------------------------------- 1 | #ifndef _RIVE_CORE_COLOR_TYPE_HPP_ 2 | #define _RIVE_CORE_COLOR_TYPE_HPP_ 3 | 4 | namespace rive 5 | { 6 | class BinaryReader; 7 | class CoreColorType 8 | { 9 | public: 10 | static const int id = 3; 11 | static int deserialize(BinaryReader& reader); 12 | }; 13 | } // namespace rive 14 | #endif -------------------------------------------------------------------------------- /src/generated/animation/animation_state_base.cpp: -------------------------------------------------------------------------------- 1 | #include "rive/generated/animation/animation_state_base.hpp" 2 | #include "rive/animation/animation_state.hpp" 3 | 4 | using namespace rive; 5 | 6 | Core* AnimationStateBase::clone() const 7 | { 8 | auto cloned = new AnimationState(); 9 | cloned->copy(*this); 10 | return cloned; 11 | } 12 | -------------------------------------------------------------------------------- /src/generated/animation/keyframe_double_base.cpp: -------------------------------------------------------------------------------- 1 | #include "rive/generated/animation/keyframe_double_base.hpp" 2 | #include "rive/animation/keyframe_double.hpp" 3 | 4 | using namespace rive; 5 | 6 | Core* KeyFrameDoubleBase::clone() const 7 | { 8 | auto cloned = new KeyFrameDouble(); 9 | cloned->copy(*this); 10 | return cloned; 11 | } 12 | -------------------------------------------------------------------------------- /src/generated/animation/keyframe_string_base.cpp: -------------------------------------------------------------------------------- 1 | #include "rive/generated/animation/keyframe_string_base.hpp" 2 | #include "rive/animation/keyframe_string.hpp" 3 | 4 | using namespace rive; 5 | 6 | Core* KeyFrameStringBase::clone() const 7 | { 8 | auto cloned = new KeyFrameString(); 9 | cloned->copy(*this); 10 | return cloned; 11 | } 12 | -------------------------------------------------------------------------------- /src/generated/constraints/ik_constraint_base.cpp: -------------------------------------------------------------------------------- 1 | #include "rive/generated/constraints/ik_constraint_base.hpp" 2 | #include "rive/constraints/ik_constraint.hpp" 3 | 4 | using namespace rive; 5 | 6 | Core* IKConstraintBase::clone() const 7 | { 8 | auto cloned = new IKConstraint(); 9 | cloned->copy(*this); 10 | return cloned; 11 | } 12 | -------------------------------------------------------------------------------- /src/generated/shapes/paint/gradient_stop_base.cpp: -------------------------------------------------------------------------------- 1 | #include "rive/generated/shapes/paint/gradient_stop_base.hpp" 2 | #include "rive/shapes/paint/gradient_stop.hpp" 3 | 4 | using namespace rive; 5 | 6 | Core* GradientStopBase::clone() const 7 | { 8 | auto cloned = new GradientStop(); 9 | cloned->copy(*this); 10 | return cloned; 11 | } 12 | -------------------------------------------------------------------------------- /src/generated/text/text_style_feature_base.cpp: -------------------------------------------------------------------------------- 1 | #include "rive/generated/text/text_style_feature_base.hpp" 2 | #include "rive/text/text_style_feature.hpp" 3 | 4 | using namespace rive; 5 | 6 | Core* TextStyleFeatureBase::clone() const 7 | { 8 | auto cloned = new TextStyleFeature(); 9 | cloned->copy(*this); 10 | return cloned; 11 | } 12 | -------------------------------------------------------------------------------- /src/generated/viewmodel/data_enum_value_base.cpp: -------------------------------------------------------------------------------- 1 | #include "rive/generated/viewmodel/data_enum_value_base.hpp" 2 | #include "rive/viewmodel/data_enum_value.hpp" 3 | 4 | using namespace rive; 5 | 6 | Core* DataEnumValueBase::clone() const 7 | { 8 | auto cloned = new DataEnumValue(); 9 | cloned->copy(*this); 10 | return cloned; 11 | } 12 | -------------------------------------------------------------------------------- /include/rive/core/field_types/core_double_type.hpp: -------------------------------------------------------------------------------- 1 | #ifndef _RIVE_CORE_DOUBLE_TYPE_HPP_ 2 | #define _RIVE_CORE_DOUBLE_TYPE_HPP_ 3 | 4 | namespace rive 5 | { 6 | class BinaryReader; 7 | class CoreDoubleType 8 | { 9 | public: 10 | static const int id = 2; 11 | static float deserialize(BinaryReader& reader); 12 | }; 13 | } // namespace rive 14 | #endif -------------------------------------------------------------------------------- /include/rive/core/field_types/core_uint_type.hpp: -------------------------------------------------------------------------------- 1 | #ifndef _RIVE_CORE_UINT_TYPE_HPP_ 2 | #define _RIVE_CORE_UINT_TYPE_HPP_ 3 | 4 | namespace rive 5 | { 6 | class BinaryReader; 7 | class CoreUintType 8 | { 9 | public: 10 | static const int id = 0; 11 | static unsigned int deserialize(BinaryReader& reader); 12 | }; 13 | } // namespace rive 14 | #endif -------------------------------------------------------------------------------- /include/rive/layout/n_slicer_tile_mode.hpp: -------------------------------------------------------------------------------- 1 | #ifndef _RIVE_N_SLICER_TILE_MODE_HPP_ 2 | #define _RIVE_N_SLICER_TILE_MODE_HPP_ 3 | #include "rive/generated/layout/n_slicer_tile_mode_base.hpp" 4 | #include 5 | namespace rive 6 | { 7 | class NSlicerTileMode : public NSlicerTileModeBase 8 | { 9 | public: 10 | }; 11 | } // namespace rive 12 | 13 | #endif -------------------------------------------------------------------------------- /src/generated/animation/linear_animation_base.cpp: -------------------------------------------------------------------------------- 1 | #include "rive/generated/animation/linear_animation_base.hpp" 2 | #include "rive/animation/linear_animation.hpp" 3 | 4 | using namespace rive; 5 | 6 | Core* LinearAnimationBase::clone() const 7 | { 8 | auto cloned = new LinearAnimation(); 9 | cloned->copy(*this); 10 | return cloned; 11 | } 12 | -------------------------------------------------------------------------------- /src/generated/animation/state_transition_base.cpp: -------------------------------------------------------------------------------- 1 | #include "rive/generated/animation/state_transition_base.hpp" 2 | #include "rive/animation/state_transition.hpp" 3 | 4 | using namespace rive; 5 | 6 | Core* StateTransitionBase::clone() const 7 | { 8 | auto cloned = new StateTransition(); 9 | cloned->copy(*this); 10 | return cloned; 11 | } 12 | -------------------------------------------------------------------------------- /src/generated/custom_property_number_base.cpp: -------------------------------------------------------------------------------- 1 | #include "rive/generated/custom_property_number_base.hpp" 2 | #include "rive/custom_property_number.hpp" 3 | 4 | using namespace rive; 5 | 6 | Core* CustomPropertyNumberBase::clone() const 7 | { 8 | auto cloned = new CustomPropertyNumber(); 9 | cloned->copy(*this); 10 | return cloned; 11 | } 12 | -------------------------------------------------------------------------------- /src/generated/custom_property_string_base.cpp: -------------------------------------------------------------------------------- 1 | #include "rive/generated/custom_property_string_base.hpp" 2 | #include "rive/custom_property_string.hpp" 3 | 4 | using namespace rive; 5 | 6 | Core* CustomPropertyStringBase::clone() const 7 | { 8 | auto cloned = new CustomPropertyString(); 9 | cloned->copy(*this); 10 | return cloned; 11 | } 12 | -------------------------------------------------------------------------------- /src/generated/layout/n_slicer_tile_mode_base.cpp: -------------------------------------------------------------------------------- 1 | #include "rive/generated/layout/n_slicer_tile_mode_base.hpp" 2 | #include "rive/layout/n_slicer_tile_mode.hpp" 3 | 4 | using namespace rive; 5 | 6 | Core* NSlicerTileModeBase::clone() const 7 | { 8 | auto cloned = new NSlicerTileMode(); 9 | cloned->copy(*this); 10 | return cloned; 11 | } 12 | -------------------------------------------------------------------------------- /src/generated/nested_artboard_layout_base.cpp: -------------------------------------------------------------------------------- 1 | #include "rive/generated/nested_artboard_layout_base.hpp" 2 | #include "rive/nested_artboard_layout.hpp" 3 | 4 | using namespace rive; 5 | 6 | Core* NestedArtboardLayoutBase::clone() const 7 | { 8 | auto cloned = new NestedArtboardLayout(); 9 | cloned->copy(*this); 10 | return cloned; 11 | } 12 | -------------------------------------------------------------------------------- /src/generated/text/text_modifier_group_base.cpp: -------------------------------------------------------------------------------- 1 | #include "rive/generated/text/text_modifier_group_base.hpp" 2 | #include "rive/text/text_modifier_group.hpp" 3 | 4 | using namespace rive; 5 | 6 | Core* TextModifierGroupBase::clone() const 7 | { 8 | auto cloned = new TextModifierGroup(); 9 | cloned->copy(*this); 10 | return cloned; 11 | } 12 | -------------------------------------------------------------------------------- /src/generated/text/text_modifier_range_base.cpp: -------------------------------------------------------------------------------- 1 | #include "rive/generated/text/text_modifier_range_base.hpp" 2 | #include "rive/text/text_modifier_range.hpp" 3 | 4 | using namespace rive; 5 | 6 | Core* TextModifierRangeBase::clone() const 7 | { 8 | auto cloned = new TextModifierRange(); 9 | cloned->copy(*this); 10 | return cloned; 11 | } 12 | -------------------------------------------------------------------------------- /src/importers/bindable_property_importer.cpp: -------------------------------------------------------------------------------- 1 | #include "rive/artboard.hpp" 2 | #include "rive/importers/bindable_property_importer.hpp" 3 | #include "rive/data_bind/bindable_property.hpp" 4 | 5 | using namespace rive; 6 | 7 | BindablePropertyImporter::BindablePropertyImporter(BindableProperty* bindableProperty) : 8 | m_bindableProperty(bindableProperty) 9 | {} -------------------------------------------------------------------------------- /src/importers/data_converter_group_importer.cpp: -------------------------------------------------------------------------------- 1 | #include "rive/artboard.hpp" 2 | #include "rive/importers/data_converter_group_importer.hpp" 3 | #include "rive/data_bind/converters/data_converter.hpp" 4 | 5 | using namespace rive; 6 | 7 | DataConverterGroupImporter::DataConverterGroupImporter(DataConverterGroup* group) : 8 | m_dataConverterGroup(group) 9 | {} -------------------------------------------------------------------------------- /test/rive_testing.cpp: -------------------------------------------------------------------------------- 1 | #include "rive_testing.hpp" 2 | 3 | bool aboutEqual(const rive::Mat2D& a, const rive::Mat2D& b) 4 | { 5 | const float epsilon = 0.0001f; 6 | for (int i = 0; i < 6; i++) 7 | { 8 | if (std::fabs(a[i] - b[i]) > epsilon) 9 | { 10 | return false; 11 | } 12 | } 13 | return true; 14 | } -------------------------------------------------------------------------------- /include/rive/animation/advanceable_state.hpp: -------------------------------------------------------------------------------- 1 | #ifndef _RIVE_ADVANCEABLE_STATE_HPP_ 2 | #define _RIVE_ADVANCEABLE_STATE_HPP_ 3 | #include "rive/generated/animation/advanceable_state_base.hpp" 4 | #include 5 | namespace rive 6 | { 7 | class AdvanceableState : public AdvanceableStateBase 8 | { 9 | public: 10 | }; 11 | } // namespace rive 12 | 13 | #endif -------------------------------------------------------------------------------- /include/rive/animation/arithmetic_operation.hpp: -------------------------------------------------------------------------------- 1 | #ifndef _RIVE_ARITHMETIC_OPERATION_HPP_ 2 | #define _RIVE_ARITHMETIC_OPERATION_HPP_ 3 | 4 | namespace rive 5 | { 6 | enum class ArithmeticOperation : int 7 | { 8 | add = 0, 9 | subtract = 1, 10 | multiply = 2, 11 | divide = 3, 12 | modulo = 4, 13 | }; 14 | } // namespace rive 15 | 16 | #endif -------------------------------------------------------------------------------- /include/rive/bones/skeletal_component.hpp: -------------------------------------------------------------------------------- 1 | #ifndef _RIVE_SKELETAL_COMPONENT_HPP_ 2 | #define _RIVE_SKELETAL_COMPONENT_HPP_ 3 | #include "rive/generated/bones/skeletal_component_base.hpp" 4 | #include 5 | namespace rive 6 | { 7 | class SkeletalComponent : public SkeletalComponentBase 8 | { 9 | public: 10 | }; 11 | } // namespace rive 12 | 13 | #endif -------------------------------------------------------------------------------- /include/rive/shapes/straight_vertex.hpp: -------------------------------------------------------------------------------- 1 | #ifndef _RIVE_STRAIGHT_VERTEX_HPP_ 2 | #define _RIVE_STRAIGHT_VERTEX_HPP_ 3 | #include "rive/generated/shapes/straight_vertex_base.hpp" 4 | namespace rive 5 | { 6 | class StraightVertex : public StraightVertexBase 7 | { 8 | protected: 9 | void radiusChanged() override; 10 | }; 11 | } // namespace rive 12 | 13 | #endif -------------------------------------------------------------------------------- /src/generated/animation/keyframe_callback_base.cpp: -------------------------------------------------------------------------------- 1 | #include "rive/generated/animation/keyframe_callback_base.hpp" 2 | #include "rive/animation/keyframe_callback.hpp" 3 | 4 | using namespace rive; 5 | 6 | Core* KeyFrameCallbackBase::clone() const 7 | { 8 | auto cloned = new KeyFrameCallback(); 9 | cloned->copy(*this); 10 | return cloned; 11 | } 12 | -------------------------------------------------------------------------------- /src/generated/assets/file_asset_contents_base.cpp: -------------------------------------------------------------------------------- 1 | #include "rive/generated/assets/file_asset_contents_base.hpp" 2 | #include "rive/assets/file_asset_contents.hpp" 3 | 4 | using namespace rive; 5 | 6 | Core* FileAssetContentsBase::clone() const 7 | { 8 | auto cloned = new FileAssetContents(); 9 | cloned->copy(*this); 10 | return cloned; 11 | } 12 | -------------------------------------------------------------------------------- /src/generated/custom_property_boolean_base.cpp: -------------------------------------------------------------------------------- 1 | #include "rive/generated/custom_property_boolean_base.hpp" 2 | #include "rive/custom_property_boolean.hpp" 3 | 4 | using namespace rive; 5 | 6 | Core* CustomPropertyBooleanBase::clone() const 7 | { 8 | auto cloned = new CustomPropertyBoolean(); 9 | cloned->copy(*this); 10 | return cloned; 11 | } 12 | -------------------------------------------------------------------------------- /src/generated/data_bind/data_bind_context_base.cpp: -------------------------------------------------------------------------------- 1 | #include "rive/generated/data_bind/data_bind_context_base.hpp" 2 | #include "rive/data_bind/data_bind_context.hpp" 3 | 4 | using namespace rive; 5 | 6 | Core* DataBindContextBase::clone() const 7 | { 8 | auto cloned = new DataBindContext(); 9 | cloned->copy(*this); 10 | return cloned; 11 | } 12 | -------------------------------------------------------------------------------- /src/generated/shapes/contour_mesh_vertex_base.cpp: -------------------------------------------------------------------------------- 1 | #include "rive/generated/shapes/contour_mesh_vertex_base.hpp" 2 | #include "rive/shapes/contour_mesh_vertex.hpp" 3 | 4 | using namespace rive; 5 | 6 | Core* ContourMeshVertexBase::clone() const 7 | { 8 | auto cloned = new ContourMeshVertex(); 9 | cloned->copy(*this); 10 | return cloned; 11 | } 12 | -------------------------------------------------------------------------------- /src/generated/shapes/paint/linear_gradient_base.cpp: -------------------------------------------------------------------------------- 1 | #include "rive/generated/shapes/paint/linear_gradient_base.hpp" 2 | #include "rive/shapes/paint/linear_gradient.hpp" 3 | 4 | using namespace rive; 5 | 6 | Core* LinearGradientBase::clone() const 7 | { 8 | auto cloned = new LinearGradient(); 9 | cloned->copy(*this); 10 | return cloned; 11 | } 12 | -------------------------------------------------------------------------------- /src/generated/shapes/paint/radial_gradient_base.cpp: -------------------------------------------------------------------------------- 1 | #include "rive/generated/shapes/paint/radial_gradient_base.hpp" 2 | #include "rive/shapes/paint/radial_gradient.hpp" 3 | 4 | using namespace rive; 5 | 6 | Core* RadialGradientBase::clone() const 7 | { 8 | auto cloned = new RadialGradient(); 9 | cloned->copy(*this); 10 | return cloned; 11 | } 12 | -------------------------------------------------------------------------------- /include/rive/animation/state_machine_bool.hpp: -------------------------------------------------------------------------------- 1 | #ifndef _RIVE_STATE_MACHINE_BOOL_HPP_ 2 | #define _RIVE_STATE_MACHINE_BOOL_HPP_ 3 | #include "rive/generated/animation/state_machine_bool_base.hpp" 4 | #include 5 | namespace rive 6 | { 7 | class StateMachineBool : public StateMachineBoolBase 8 | { 9 | public: 10 | }; 11 | } // namespace rive 12 | 13 | #endif -------------------------------------------------------------------------------- /include/rive/animation/state_machine_trigger.hpp: -------------------------------------------------------------------------------- 1 | #ifndef _RIVE_STATE_MACHINE_TRIGGER_HPP_ 2 | #define _RIVE_STATE_MACHINE_TRIGGER_HPP_ 3 | #include "rive/generated/animation/state_machine_trigger_base.hpp" 4 | #include 5 | namespace rive 6 | { 7 | class StateMachineTrigger : public StateMachineTriggerBase 8 | {}; 9 | } // namespace rive 10 | 11 | #endif -------------------------------------------------------------------------------- /src/generated/animation/blend_animation_1d_base.cpp: -------------------------------------------------------------------------------- 1 | #include "rive/generated/animation/blend_animation_1d_base.hpp" 2 | #include "rive/animation/blend_animation_1d.hpp" 3 | 4 | using namespace rive; 5 | 6 | Core* BlendAnimation1DBase::clone() const 7 | { 8 | auto cloned = new BlendAnimation1D(); 9 | cloned->copy(*this); 10 | return cloned; 11 | } 12 | -------------------------------------------------------------------------------- /src/generated/animation/blend_state_direct_base.cpp: -------------------------------------------------------------------------------- 1 | #include "rive/generated/animation/blend_state_direct_base.hpp" 2 | #include "rive/animation/blend_state_direct.hpp" 3 | 4 | using namespace rive; 5 | 6 | Core* BlendStateDirectBase::clone() const 7 | { 8 | auto cloned = new BlendStateDirect(); 9 | cloned->copy(*this); 10 | return cloned; 11 | } 12 | -------------------------------------------------------------------------------- /src/generated/animation/state_machine_bool_base.cpp: -------------------------------------------------------------------------------- 1 | #include "rive/generated/animation/state_machine_bool_base.hpp" 2 | #include "rive/animation/state_machine_bool.hpp" 3 | 4 | using namespace rive; 5 | 6 | Core* StateMachineBoolBase::clone() const 7 | { 8 | auto cloned = new StateMachineBool(); 9 | cloned->copy(*this); 10 | return cloned; 11 | } 12 | -------------------------------------------------------------------------------- /src/generated/constraints/scale_constraint_base.cpp: -------------------------------------------------------------------------------- 1 | #include "rive/generated/constraints/scale_constraint_base.hpp" 2 | #include "rive/constraints/scale_constraint.hpp" 3 | 4 | using namespace rive; 5 | 6 | Core* ScaleConstraintBase::clone() const 7 | { 8 | auto cloned = new ScaleConstraint(); 9 | cloned->copy(*this); 10 | return cloned; 11 | } 12 | -------------------------------------------------------------------------------- /src/generated/viewmodel/viewmodel_instance_base.cpp: -------------------------------------------------------------------------------- 1 | #include "rive/generated/viewmodel/viewmodel_instance_base.hpp" 2 | #include "rive/viewmodel/viewmodel_instance.hpp" 3 | 4 | using namespace rive; 5 | 6 | Core* ViewModelInstanceBase::clone() const 7 | { 8 | auto cloned = new ViewModelInstance(); 9 | cloned->copy(*this); 10 | return cloned; 11 | } 12 | -------------------------------------------------------------------------------- /src/generated/viewmodel/viewmodel_property_base.cpp: -------------------------------------------------------------------------------- 1 | #include "rive/generated/viewmodel/viewmodel_property_base.hpp" 2 | #include "rive/viewmodel/viewmodel_property.hpp" 3 | 4 | using namespace rive; 5 | 6 | Core* ViewModelPropertyBase::clone() const 7 | { 8 | auto cloned = new ViewModelProperty(); 9 | cloned->copy(*this); 10 | return cloned; 11 | } 12 | -------------------------------------------------------------------------------- /include/rive/custom_property_number.hpp: -------------------------------------------------------------------------------- 1 | #ifndef _RIVE_CUSTOM_PROPERTY_NUMBER_HPP_ 2 | #define _RIVE_CUSTOM_PROPERTY_NUMBER_HPP_ 3 | #include "rive/generated/custom_property_number_base.hpp" 4 | #include 5 | namespace rive 6 | { 7 | class CustomPropertyNumber : public CustomPropertyNumberBase 8 | { 9 | public: 10 | }; 11 | } // namespace rive 12 | 13 | #endif -------------------------------------------------------------------------------- /include/rive/custom_property_string.hpp: -------------------------------------------------------------------------------- 1 | #ifndef _RIVE_CUSTOM_PROPERTY_STRING_HPP_ 2 | #define _RIVE_CUSTOM_PROPERTY_STRING_HPP_ 3 | #include "rive/generated/custom_property_string_base.hpp" 4 | #include 5 | namespace rive 6 | { 7 | class CustomPropertyString : public CustomPropertyStringBase 8 | { 9 | public: 10 | }; 11 | } // namespace rive 12 | 13 | #endif -------------------------------------------------------------------------------- /src/generated/animation/listener_fire_event_base.cpp: -------------------------------------------------------------------------------- 1 | #include "rive/generated/animation/listener_fire_event_base.hpp" 2 | #include "rive/animation/listener_fire_event.hpp" 3 | 4 | using namespace rive; 5 | 6 | Core* ListenerFireEventBase::clone() const 7 | { 8 | auto cloned = new ListenerFireEvent(); 9 | cloned->copy(*this); 10 | return cloned; 11 | } 12 | -------------------------------------------------------------------------------- /src/generated/animation/state_machine_layer_base.cpp: -------------------------------------------------------------------------------- 1 | #include "rive/generated/animation/state_machine_layer_base.hpp" 2 | #include "rive/animation/state_machine_layer.hpp" 3 | 4 | using namespace rive; 5 | 6 | Core* StateMachineLayerBase::clone() const 7 | { 8 | auto cloned = new StateMachineLayer(); 9 | cloned->copy(*this); 10 | return cloned; 11 | } 12 | -------------------------------------------------------------------------------- /src/generated/shapes/cubic_detached_vertex_base.cpp: -------------------------------------------------------------------------------- 1 | #include "rive/generated/shapes/cubic_detached_vertex_base.hpp" 2 | #include "rive/shapes/cubic_detached_vertex.hpp" 3 | 4 | using namespace rive; 5 | 6 | Core* CubicDetachedVertexBase::clone() const 7 | { 8 | auto cloned = new CubicDetachedVertex(); 9 | cloned->copy(*this); 10 | return cloned; 11 | } 12 | -------------------------------------------------------------------------------- /src/generated/shapes/cubic_mirrored_vertex_base.cpp: -------------------------------------------------------------------------------- 1 | #include "rive/generated/shapes/cubic_mirrored_vertex_base.hpp" 2 | #include "rive/shapes/cubic_mirrored_vertex.hpp" 3 | 4 | using namespace rive; 5 | 6 | Core* CubicMirroredVertexBase::clone() const 7 | { 8 | auto cloned = new CubicMirroredVertex(); 9 | cloned->copy(*this); 10 | return cloned; 11 | } 12 | -------------------------------------------------------------------------------- /src/generated/viewmodel/viewmodel_component_base.cpp: -------------------------------------------------------------------------------- 1 | #include "rive/generated/viewmodel/viewmodel_component_base.hpp" 2 | #include "rive/viewmodel/viewmodel_component.hpp" 3 | 4 | using namespace rive; 5 | 6 | Core* ViewModelComponentBase::clone() const 7 | { 8 | auto cloned = new ViewModelComponent(); 9 | cloned->copy(*this); 10 | return cloned; 11 | } 12 | -------------------------------------------------------------------------------- /viewer/include/viewer/tess/viewer_sokol_factory.hpp: -------------------------------------------------------------------------------- 1 | #ifndef _RIVE_VIEWER_SOKOL_FACTORY_HPP_ 2 | #define _RIVE_VIEWER_SOKOL_FACTORY_HPP_ 3 | 4 | #include "rive/tess/sokol/sokol_factory.hpp" 5 | 6 | class ViewerSokolFactory : public rive::SokolFactory 7 | { 8 | public: 9 | rive::rcp decodeImage(rive::Span) override; 10 | }; 11 | #endif -------------------------------------------------------------------------------- /include/rive/animation/state_machine_number.hpp: -------------------------------------------------------------------------------- 1 | #ifndef _RIVE_STATE_MACHINE_NUMBER_HPP_ 2 | #define _RIVE_STATE_MACHINE_NUMBER_HPP_ 3 | #include "rive/generated/animation/state_machine_number_base.hpp" 4 | #include 5 | namespace rive 6 | { 7 | class StateMachineNumber : public StateMachineNumberBase 8 | { 9 | public: 10 | }; 11 | } // namespace rive 12 | 13 | #endif -------------------------------------------------------------------------------- /include/rive/custom_property_boolean.hpp: -------------------------------------------------------------------------------- 1 | #ifndef _RIVE_CUSTOM_PROPERTY_BOOLEAN_HPP_ 2 | #define _RIVE_CUSTOM_PROPERTY_BOOLEAN_HPP_ 3 | #include "rive/generated/custom_property_boolean_base.hpp" 4 | #include 5 | namespace rive 6 | { 7 | class CustomPropertyBoolean : public CustomPropertyBooleanBase 8 | { 9 | public: 10 | }; 11 | } // namespace rive 12 | 13 | #endif -------------------------------------------------------------------------------- /include/rive/text/text_modifier.hpp: -------------------------------------------------------------------------------- 1 | #ifndef _RIVE_TEXT_MODIFIER_HPP_ 2 | #define _RIVE_TEXT_MODIFIER_HPP_ 3 | #include "rive/generated/text/text_modifier_base.hpp" 4 | 5 | namespace rive 6 | { 7 | class TextModifier : public TextModifierBase 8 | { 9 | public: 10 | StatusCode onAddedDirty(CoreContext* context) override; 11 | }; 12 | } // namespace rive 13 | 14 | #endif -------------------------------------------------------------------------------- /include/rive/viewmodel/viewmodel_component.hpp: -------------------------------------------------------------------------------- 1 | #ifndef _RIVE_VIEW_MODEL_COMPONENT_HPP_ 2 | #define _RIVE_VIEW_MODEL_COMPONENT_HPP_ 3 | #include "rive/generated/viewmodel/viewmodel_component_base.hpp" 4 | #include 5 | namespace rive 6 | { 7 | class ViewModelComponent : public ViewModelComponentBase 8 | { 9 | public: 10 | }; 11 | } // namespace rive 12 | 13 | #endif -------------------------------------------------------------------------------- /src/generated/animation/elastic_interpolator_base.cpp: -------------------------------------------------------------------------------- 1 | #include "rive/generated/animation/elastic_interpolator_base.hpp" 2 | #include "rive/animation/elastic_interpolator.hpp" 3 | 4 | using namespace rive; 5 | 6 | Core* ElasticInterpolatorBase::clone() const 7 | { 8 | auto cloned = new ElasticInterpolator(); 9 | cloned->copy(*this); 10 | return cloned; 11 | } 12 | -------------------------------------------------------------------------------- /src/generated/animation/listener_bool_change_base.cpp: -------------------------------------------------------------------------------- 1 | #include "rive/generated/animation/listener_bool_change_base.hpp" 2 | #include "rive/animation/listener_bool_change.hpp" 3 | 4 | using namespace rive; 5 | 6 | Core* ListenerBoolChangeBase::clone() const 7 | { 8 | auto cloned = new ListenerBoolChange(); 9 | cloned->copy(*this); 10 | return cloned; 11 | } 12 | -------------------------------------------------------------------------------- /src/generated/animation/nested_state_machine_base.cpp: -------------------------------------------------------------------------------- 1 | #include "rive/generated/animation/nested_state_machine_base.hpp" 2 | #include "rive/animation/nested_state_machine.hpp" 3 | 4 | using namespace rive; 5 | 6 | Core* NestedStateMachineBase::clone() const 7 | { 8 | auto cloned = new NestedStateMachine(); 9 | cloned->copy(*this); 10 | return cloned; 11 | } 12 | -------------------------------------------------------------------------------- /src/generated/animation/state_machine_number_base.cpp: -------------------------------------------------------------------------------- 1 | #include "rive/generated/animation/state_machine_number_base.hpp" 2 | #include "rive/animation/state_machine_number.hpp" 3 | 4 | using namespace rive; 5 | 6 | Core* StateMachineNumberBase::clone() const 7 | { 8 | auto cloned = new StateMachineNumber(); 9 | cloned->copy(*this); 10 | return cloned; 11 | } 12 | -------------------------------------------------------------------------------- /src/generated/layout/layout_component_style_base.cpp: -------------------------------------------------------------------------------- 1 | #include "rive/generated/layout/layout_component_style_base.hpp" 2 | #include "rive/layout/layout_component_style.hpp" 3 | 4 | using namespace rive; 5 | 6 | Core* LayoutComponentStyleBase::clone() const 7 | { 8 | auto cloned = new LayoutComponentStyle(); 9 | cloned->copy(*this); 10 | return cloned; 11 | } 12 | -------------------------------------------------------------------------------- /src/generated/text/text_variation_modifier_base.cpp: -------------------------------------------------------------------------------- 1 | #include "rive/generated/text/text_variation_modifier_base.hpp" 2 | #include "rive/text/text_variation_modifier.hpp" 3 | 4 | using namespace rive; 5 | 6 | Core* TextVariationModifierBase::clone() const 7 | { 8 | auto cloned = new TextVariationModifier(); 9 | cloned->copy(*this); 10 | return cloned; 11 | } 12 | -------------------------------------------------------------------------------- /dev/update_defs.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | rm -fR .clone_defs 2> /dev/null 3 | mkdir .clone_defs 4 | cd .clone_defs 5 | git init 6 | git remote add origin -f git@github.com:rive-app/rive.git 7 | git config core.sparseCheckout true 8 | echo '/dev/defs/*' > .git/info/sparse-checkout 9 | git pull origin master 10 | 11 | rm -fR ../defs 12 | mv dev/defs ../ 13 | cd .. 14 | rm -fR .clone_defs -------------------------------------------------------------------------------- /src/generated/animation/listener_align_target_base.cpp: -------------------------------------------------------------------------------- 1 | #include "rive/generated/animation/listener_align_target_base.hpp" 2 | #include "rive/animation/listener_align_target.hpp" 3 | 4 | using namespace rive; 5 | 6 | Core* ListenerAlignTargetBase::clone() const 7 | { 8 | auto cloned = new ListenerAlignTarget(); 9 | cloned->copy(*this); 10 | return cloned; 11 | } 12 | -------------------------------------------------------------------------------- /src/generated/animation/state_machine_trigger_base.cpp: -------------------------------------------------------------------------------- 1 | #include "rive/generated/animation/state_machine_trigger_base.hpp" 2 | #include "rive/animation/state_machine_trigger.hpp" 3 | 4 | using namespace rive; 5 | 6 | Core* StateMachineTriggerBase::clone() const 7 | { 8 | auto cloned = new StateMachineTrigger(); 9 | cloned->copy(*this); 10 | return cloned; 11 | } 12 | -------------------------------------------------------------------------------- /src/generated/constraints/distance_constraint_base.cpp: -------------------------------------------------------------------------------- 1 | #include "rive/generated/constraints/distance_constraint_base.hpp" 2 | #include "rive/constraints/distance_constraint.hpp" 3 | 4 | using namespace rive; 5 | 6 | Core* DistanceConstraintBase::clone() const 7 | { 8 | auto cloned = new DistanceConstraint(); 9 | cloned->copy(*this); 10 | return cloned; 11 | } 12 | -------------------------------------------------------------------------------- /src/generated/constraints/rotation_constraint_base.cpp: -------------------------------------------------------------------------------- 1 | #include "rive/generated/constraints/rotation_constraint_base.hpp" 2 | #include "rive/constraints/rotation_constraint.hpp" 3 | 4 | using namespace rive; 5 | 6 | Core* RotationConstraintBase::clone() const 7 | { 8 | auto cloned = new RotationConstraint(); 9 | cloned->copy(*this); 10 | return cloned; 11 | } 12 | -------------------------------------------------------------------------------- /src/generated/shapes/cubic_asymmetric_vertex_base.cpp: -------------------------------------------------------------------------------- 1 | #include "rive/generated/shapes/cubic_asymmetric_vertex_base.hpp" 2 | #include "rive/shapes/cubic_asymmetric_vertex.hpp" 3 | 4 | using namespace rive; 5 | 6 | Core* CubicAsymmetricVertexBase::clone() const 7 | { 8 | auto cloned = new CubicAsymmetricVertex(); 9 | cloned->copy(*this); 10 | return cloned; 11 | } 12 | -------------------------------------------------------------------------------- /src/viewmodel/viewmodel_instance_viewmodel.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | 5 | #include "rive/viewmodel/viewmodel_instance_viewmodel.hpp" 6 | 7 | using namespace rive; 8 | 9 | void ViewModelInstanceViewModel::setRoot(ViewModelInstance* value) 10 | { 11 | Super::setRoot(value); 12 | referenceViewModelInstance()->setRoot(value); 13 | } -------------------------------------------------------------------------------- /include/rive/core_context.hpp: -------------------------------------------------------------------------------- 1 | #ifndef _RIVE_CORE_CONTEXT_HPP_ 2 | #define _RIVE_CORE_CONTEXT_HPP_ 3 | 4 | #include "rive/rive_types.hpp" 5 | 6 | namespace rive 7 | { 8 | class Artboard; 9 | class Core; 10 | class CoreContext 11 | { 12 | public: 13 | virtual ~CoreContext() {} 14 | virtual Core* resolve(uint32_t id) const = 0; 15 | }; 16 | } // namespace rive 17 | #endif 18 | -------------------------------------------------------------------------------- /include/rive/data_bind/bindable_property.hpp: -------------------------------------------------------------------------------- 1 | #ifndef _RIVE_BINDABLE_PROPERTY_HPP_ 2 | #define _RIVE_BINDABLE_PROPERTY_HPP_ 3 | #include "rive/generated/data_bind/bindable_property_base.hpp" 4 | #include "rive/data_bind/data_bind.hpp" 5 | #include 6 | namespace rive 7 | { 8 | class BindableProperty : public BindablePropertyBase 9 | {}; 10 | } // namespace rive 11 | 12 | #endif -------------------------------------------------------------------------------- /src/generated/animation/blend_animation_direct_base.cpp: -------------------------------------------------------------------------------- 1 | #include "rive/generated/animation/blend_animation_direct_base.hpp" 2 | #include "rive/animation/blend_animation_direct.hpp" 3 | 4 | using namespace rive; 5 | 6 | Core* BlendAnimationDirectBase::clone() const 7 | { 8 | auto cloned = new BlendAnimationDirect(); 9 | cloned->copy(*this); 10 | return cloned; 11 | } 12 | -------------------------------------------------------------------------------- /src/generated/animation/blend_state_transition_base.cpp: -------------------------------------------------------------------------------- 1 | #include "rive/generated/animation/blend_state_transition_base.hpp" 2 | #include "rive/animation/blend_state_transition.hpp" 3 | 4 | using namespace rive; 5 | 6 | Core* BlendStateTransitionBase::clone() const 7 | { 8 | auto cloned = new BlendStateTransition(); 9 | cloned->copy(*this); 10 | return cloned; 11 | } 12 | -------------------------------------------------------------------------------- /src/generated/animation/listener_number_change_base.cpp: -------------------------------------------------------------------------------- 1 | #include "rive/generated/animation/listener_number_change_base.hpp" 2 | #include "rive/animation/listener_number_change.hpp" 3 | 4 | using namespace rive; 5 | 6 | Core* ListenerNumberChangeBase::clone() const 7 | { 8 | auto cloned = new ListenerNumberChange(); 9 | cloned->copy(*this); 10 | return cloned; 11 | } 12 | -------------------------------------------------------------------------------- /src/generated/animation/nested_remap_animation_base.cpp: -------------------------------------------------------------------------------- 1 | #include "rive/generated/animation/nested_remap_animation_base.hpp" 2 | #include "rive/animation/nested_remap_animation.hpp" 3 | 4 | using namespace rive; 5 | 6 | Core* NestedRemapAnimationBase::clone() const 7 | { 8 | auto cloned = new NestedRemapAnimation(); 9 | cloned->copy(*this); 10 | return cloned; 11 | } 12 | -------------------------------------------------------------------------------- /src/generated/animation/state_machine_listener_base.cpp: -------------------------------------------------------------------------------- 1 | #include "rive/generated/animation/state_machine_listener_base.hpp" 2 | #include "rive/animation/state_machine_listener.hpp" 3 | 4 | using namespace rive; 5 | 6 | Core* StateMachineListenerBase::clone() const 7 | { 8 | auto cloned = new StateMachineListener(); 9 | cloned->copy(*this); 10 | return cloned; 11 | } 12 | -------------------------------------------------------------------------------- /src/generated/constraints/transform_constraint_base.cpp: -------------------------------------------------------------------------------- 1 | #include "rive/generated/constraints/transform_constraint_base.hpp" 2 | #include "rive/constraints/transform_constraint.hpp" 3 | 4 | using namespace rive; 5 | 6 | Core* TransformConstraintBase::clone() const 7 | { 8 | auto cloned = new TransformConstraint(); 9 | cloned->copy(*this); 10 | return cloned; 11 | } 12 | -------------------------------------------------------------------------------- /src/generated/data_bind/bindable_property_enum_base.cpp: -------------------------------------------------------------------------------- 1 | #include "rive/generated/data_bind/bindable_property_enum_base.hpp" 2 | #include "rive/data_bind/bindable_property_enum.hpp" 3 | 4 | using namespace rive; 5 | 6 | Core* BindablePropertyEnumBase::clone() const 7 | { 8 | auto cloned = new BindablePropertyEnum(); 9 | cloned->copy(*this); 10 | return cloned; 11 | } 12 | -------------------------------------------------------------------------------- /dev/defs/shapes/paint/fill.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Fill", 3 | "key": { 4 | "int": 20, 5 | "string": "fill" 6 | }, 7 | "extends": "shapes/paint/shape_paint.json", 8 | "properties": { 9 | "fillRule": { 10 | "type": "uint", 11 | "initialValue": "0", 12 | "key": { 13 | "int": 40, 14 | "string": "fillrule" 15 | } 16 | } 17 | } 18 | } -------------------------------------------------------------------------------- /include/rive/core/field_types/core_string_type.hpp: -------------------------------------------------------------------------------- 1 | #ifndef _RIVE_CORE_STRING_TYPE_HPP_ 2 | #define _RIVE_CORE_STRING_TYPE_HPP_ 3 | 4 | #include 5 | 6 | namespace rive 7 | { 8 | class BinaryReader; 9 | class CoreStringType 10 | { 11 | public: 12 | static const int id = 1; 13 | static std::string deserialize(BinaryReader& reader); 14 | }; 15 | } // namespace rive 16 | #endif -------------------------------------------------------------------------------- /include/rive/data_bind/bindable_property_enum.hpp: -------------------------------------------------------------------------------- 1 | #ifndef _RIVE_BINDABLE_PROPERTY_ENUM_HPP_ 2 | #define _RIVE_BINDABLE_PROPERTY_ENUM_HPP_ 3 | #include "rive/generated/data_bind/bindable_property_enum_base.hpp" 4 | #include 5 | namespace rive 6 | { 7 | class BindablePropertyEnum : public BindablePropertyEnumBase 8 | { 9 | public: 10 | }; 11 | } // namespace rive 12 | 13 | #endif -------------------------------------------------------------------------------- /src/generated/animation/cubic_ease_interpolator_base.cpp: -------------------------------------------------------------------------------- 1 | #include "rive/generated/animation/cubic_ease_interpolator_base.hpp" 2 | #include "rive/animation/cubic_ease_interpolator.hpp" 3 | 4 | using namespace rive; 5 | 6 | Core* CubicEaseInterpolatorBase::clone() const 7 | { 8 | auto cloned = new CubicEaseInterpolator(); 9 | cloned->copy(*this); 10 | return cloned; 11 | } 12 | -------------------------------------------------------------------------------- /src/generated/animation/listener_trigger_change_base.cpp: -------------------------------------------------------------------------------- 1 | #include "rive/generated/animation/listener_trigger_change_base.hpp" 2 | #include "rive/animation/listener_trigger_change.hpp" 3 | 4 | using namespace rive; 5 | 6 | Core* ListenerTriggerChangeBase::clone() const 7 | { 8 | auto cloned = new ListenerTriggerChange(); 9 | cloned->copy(*this); 10 | return cloned; 11 | } 12 | -------------------------------------------------------------------------------- /src/generated/animation/nested_simple_animation_base.cpp: -------------------------------------------------------------------------------- 1 | #include "rive/generated/animation/nested_simple_animation_base.hpp" 2 | #include "rive/animation/nested_simple_animation.hpp" 3 | 4 | using namespace rive; 5 | 6 | Core* NestedSimpleAnimationBase::clone() const 7 | { 8 | auto cloned = new NestedSimpleAnimation(); 9 | cloned->copy(*this); 10 | return cloned; 11 | } 12 | -------------------------------------------------------------------------------- /src/generated/constraints/follow_path_constraint_base.cpp: -------------------------------------------------------------------------------- 1 | #include "rive/generated/constraints/follow_path_constraint_base.hpp" 2 | #include "rive/constraints/follow_path_constraint.hpp" 3 | 4 | using namespace rive; 5 | 6 | Core* FollowPathConstraintBase::clone() const 7 | { 8 | auto cloned = new FollowPathConstraint(); 9 | cloned->copy(*this); 10 | return cloned; 11 | } 12 | -------------------------------------------------------------------------------- /src/generated/data_bind/bindable_property_color_base.cpp: -------------------------------------------------------------------------------- 1 | #include "rive/generated/data_bind/bindable_property_color_base.hpp" 2 | #include "rive/data_bind/bindable_property_color.hpp" 3 | 4 | using namespace rive; 5 | 6 | Core* BindablePropertyColorBase::clone() const 7 | { 8 | auto cloned = new BindablePropertyColor(); 9 | cloned->copy(*this); 10 | return cloned; 11 | } 12 | -------------------------------------------------------------------------------- /src/generated/viewmodel/viewmodel_instance_enum_base.cpp: -------------------------------------------------------------------------------- 1 | #include "rive/generated/viewmodel/viewmodel_instance_enum_base.hpp" 2 | #include "rive/viewmodel/viewmodel_instance_enum.hpp" 3 | 4 | using namespace rive; 5 | 6 | Core* ViewModelInstanceEnumBase::clone() const 7 | { 8 | auto cloned = new ViewModelInstanceEnum(); 9 | cloned->copy(*this); 10 | return cloned; 11 | } 12 | -------------------------------------------------------------------------------- /src/generated/viewmodel/viewmodel_instance_list_base.cpp: -------------------------------------------------------------------------------- 1 | #include "rive/generated/viewmodel/viewmodel_instance_list_base.hpp" 2 | #include "rive/viewmodel/viewmodel_instance_list.hpp" 3 | 4 | using namespace rive; 5 | 6 | Core* ViewModelInstanceListBase::clone() const 7 | { 8 | auto cloned = new ViewModelInstanceList(); 9 | cloned->copy(*this); 10 | return cloned; 11 | } 12 | -------------------------------------------------------------------------------- /src/generated/viewmodel/viewmodel_property_enum_base.cpp: -------------------------------------------------------------------------------- 1 | #include "rive/generated/viewmodel/viewmodel_property_enum_base.hpp" 2 | #include "rive/viewmodel/viewmodel_property_enum.hpp" 3 | 4 | using namespace rive; 5 | 6 | Core* ViewModelPropertyEnumBase::clone() const 7 | { 8 | auto cloned = new ViewModelPropertyEnum(); 9 | cloned->copy(*this); 10 | return cloned; 11 | } 12 | -------------------------------------------------------------------------------- /src/generated/viewmodel/viewmodel_property_list_base.cpp: -------------------------------------------------------------------------------- 1 | #include "rive/generated/viewmodel/viewmodel_property_list_base.hpp" 2 | #include "rive/viewmodel/viewmodel_property_list.hpp" 3 | 4 | using namespace rive; 5 | 6 | Core* ViewModelPropertyListBase::clone() const 7 | { 8 | auto cloned = new ViewModelPropertyList(); 9 | cloned->copy(*this); 10 | return cloned; 11 | } 12 | -------------------------------------------------------------------------------- /test/node_test.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | TEST_CASE("Node instances", "[core]") { REQUIRE(rive::Node().x() == 0.0f); } 5 | 6 | TEST_CASE("nodeX function return x value", "[node]") 7 | { 8 | rive::Node* node = new rive::Node(); 9 | REQUIRE(node->x() == 0.0f); 10 | node->x(2.0f); 11 | REQUIRE(node->x() == 2.0f); 12 | delete node; 13 | } -------------------------------------------------------------------------------- /include/rive/animation/state_machine_component.hpp: -------------------------------------------------------------------------------- 1 | #ifndef _RIVE_STATE_MACHINE_COMPONENT_HPP_ 2 | #define _RIVE_STATE_MACHINE_COMPONENT_HPP_ 3 | #include "rive/generated/animation/state_machine_component_base.hpp" 4 | #include 5 | namespace rive 6 | { 7 | class StateMachineComponent : public StateMachineComponentBase 8 | { 9 | public: 10 | }; 11 | } // namespace rive 12 | 13 | #endif -------------------------------------------------------------------------------- /include/rive/bounds_provider.hpp: -------------------------------------------------------------------------------- 1 | #ifndef _RIVE_BOUNDS_PROVIDER_HPP_ 2 | #define _RIVE_BOUNDS_PROVIDER_HPP_ 3 | 4 | #include "rive/math/aabb.hpp" 5 | #include "rive/math/mat2d.hpp" 6 | 7 | namespace rive 8 | { 9 | 10 | class BoundsProvider 11 | { 12 | public: 13 | virtual ~BoundsProvider() {} 14 | virtual AABB computeBounds(Mat2D toParent); 15 | }; 16 | } // namespace rive 17 | #endif -------------------------------------------------------------------------------- /include/rive/data_bind/bindable_property_color.hpp: -------------------------------------------------------------------------------- 1 | #ifndef _RIVE_BINDABLE_PROPERTY_COLOR_HPP_ 2 | #define _RIVE_BINDABLE_PROPERTY_COLOR_HPP_ 3 | #include "rive/generated/data_bind/bindable_property_color_base.hpp" 4 | #include 5 | namespace rive 6 | { 7 | class BindablePropertyColor : public BindablePropertyColorBase 8 | { 9 | public: 10 | }; 11 | } // namespace rive 12 | 13 | #endif -------------------------------------------------------------------------------- /include/rive/viewmodel/viewmodel_property_list.hpp: -------------------------------------------------------------------------------- 1 | #ifndef _RIVE_VIEW_MODEL_PROPERTY_LIST_HPP_ 2 | #define _RIVE_VIEW_MODEL_PROPERTY_LIST_HPP_ 3 | #include "rive/generated/viewmodel/viewmodel_property_list_base.hpp" 4 | #include 5 | namespace rive 6 | { 7 | class ViewModelPropertyList : public ViewModelPropertyListBase 8 | { 9 | public: 10 | }; 11 | } // namespace rive 12 | 13 | #endif -------------------------------------------------------------------------------- /src/generated/animation/cubic_value_interpolator_base.cpp: -------------------------------------------------------------------------------- 1 | #include "rive/generated/animation/cubic_value_interpolator_base.hpp" 2 | #include "rive/animation/cubic_value_interpolator.hpp" 3 | 4 | using namespace rive; 5 | 6 | Core* CubicValueInterpolatorBase::clone() const 7 | { 8 | auto cloned = new CubicValueInterpolator(); 9 | cloned->copy(*this); 10 | return cloned; 11 | } 12 | -------------------------------------------------------------------------------- /src/generated/animation/state_machine_fire_event_base.cpp: -------------------------------------------------------------------------------- 1 | #include "rive/generated/animation/state_machine_fire_event_base.hpp" 2 | #include "rive/animation/state_machine_fire_event.hpp" 3 | 4 | using namespace rive; 5 | 6 | Core* StateMachineFireEventBase::clone() const 7 | { 8 | auto cloned = new StateMachineFireEvent(); 9 | cloned->copy(*this); 10 | return cloned; 11 | } 12 | -------------------------------------------------------------------------------- /src/generated/constraints/translation_constraint_base.cpp: -------------------------------------------------------------------------------- 1 | #include "rive/generated/constraints/translation_constraint_base.hpp" 2 | #include "rive/constraints/translation_constraint.hpp" 3 | 4 | using namespace rive; 5 | 6 | Core* TranslationConstraintBase::clone() const 7 | { 8 | auto cloned = new TranslationConstraint(); 9 | cloned->copy(*this); 10 | return cloned; 11 | } 12 | -------------------------------------------------------------------------------- /src/generated/data_bind/bindable_property_number_base.cpp: -------------------------------------------------------------------------------- 1 | #include "rive/generated/data_bind/bindable_property_number_base.hpp" 2 | #include "rive/data_bind/bindable_property_number.hpp" 3 | 4 | using namespace rive; 5 | 6 | Core* BindablePropertyNumberBase::clone() const 7 | { 8 | auto cloned = new BindablePropertyNumber(); 9 | cloned->copy(*this); 10 | return cloned; 11 | } 12 | -------------------------------------------------------------------------------- /src/generated/data_bind/bindable_property_string_base.cpp: -------------------------------------------------------------------------------- 1 | #include "rive/generated/data_bind/bindable_property_string_base.hpp" 2 | #include "rive/data_bind/bindable_property_string.hpp" 3 | 4 | using namespace rive; 5 | 6 | Core* BindablePropertyStringBase::clone() const 7 | { 8 | auto cloned = new BindablePropertyString(); 9 | cloned->copy(*this); 10 | return cloned; 11 | } 12 | -------------------------------------------------------------------------------- /src/generated/viewmodel/viewmodel_instance_color_base.cpp: -------------------------------------------------------------------------------- 1 | #include "rive/generated/viewmodel/viewmodel_instance_color_base.hpp" 2 | #include "rive/viewmodel/viewmodel_instance_color.hpp" 3 | 4 | using namespace rive; 5 | 6 | Core* ViewModelInstanceColorBase::clone() const 7 | { 8 | auto cloned = new ViewModelInstanceColor(); 9 | cloned->copy(*this); 10 | return cloned; 11 | } 12 | -------------------------------------------------------------------------------- /src/generated/viewmodel/viewmodel_property_color_base.cpp: -------------------------------------------------------------------------------- 1 | #include "rive/generated/viewmodel/viewmodel_property_color_base.hpp" 2 | #include "rive/viewmodel/viewmodel_property_color.hpp" 3 | 4 | using namespace rive; 5 | 6 | Core* ViewModelPropertyColorBase::clone() const 7 | { 8 | auto cloned = new ViewModelPropertyColor(); 9 | cloned->copy(*this); 10 | return cloned; 11 | } 12 | -------------------------------------------------------------------------------- /include/rive/data_bind/bindable_property_number.hpp: -------------------------------------------------------------------------------- 1 | #ifndef _RIVE_BINDABLE_PROPERTY_NUMBER_HPP_ 2 | #define _RIVE_BINDABLE_PROPERTY_NUMBER_HPP_ 3 | #include "rive/generated/data_bind/bindable_property_number_base.hpp" 4 | #include 5 | namespace rive 6 | { 7 | class BindablePropertyNumber : public BindablePropertyNumberBase 8 | { 9 | public: 10 | }; 11 | } // namespace rive 12 | 13 | #endif -------------------------------------------------------------------------------- /include/rive/data_bind/bindable_property_string.hpp: -------------------------------------------------------------------------------- 1 | #ifndef _RIVE_BINDABLE_PROPERTY_STRING_HPP_ 2 | #define _RIVE_BINDABLE_PROPERTY_STRING_HPP_ 3 | #include "rive/generated/data_bind/bindable_property_string_base.hpp" 4 | #include 5 | namespace rive 6 | { 7 | class BindablePropertyString : public BindablePropertyStringBase 8 | { 9 | public: 10 | }; 11 | } // namespace rive 12 | 13 | #endif -------------------------------------------------------------------------------- /include/rive/viewmodel/viewmodel_property_color.hpp: -------------------------------------------------------------------------------- 1 | #ifndef _RIVE_VIEW_MODEL_PROPERTY_COLOR_HPP_ 2 | #define _RIVE_VIEW_MODEL_PROPERTY_COLOR_HPP_ 3 | #include "rive/generated/viewmodel/viewmodel_property_color_base.hpp" 4 | #include 5 | namespace rive 6 | { 7 | class ViewModelPropertyColor : public ViewModelPropertyColorBase 8 | { 9 | public: 10 | }; 11 | } // namespace rive 12 | 13 | #endif -------------------------------------------------------------------------------- /src/generated/animation/listener_viewmodel_change_base.cpp: -------------------------------------------------------------------------------- 1 | #include "rive/generated/animation/listener_viewmodel_change_base.hpp" 2 | #include "rive/animation/listener_viewmodel_change.hpp" 3 | 4 | using namespace rive; 5 | 6 | Core* ListenerViewModelChangeBase::clone() const 7 | { 8 | auto cloned = new ListenerViewModelChange(); 9 | cloned->copy(*this); 10 | return cloned; 11 | } 12 | -------------------------------------------------------------------------------- /src/generated/animation/transition_bool_condition_base.cpp: -------------------------------------------------------------------------------- 1 | #include "rive/generated/animation/transition_bool_condition_base.hpp" 2 | #include "rive/animation/transition_bool_condition.hpp" 3 | 4 | using namespace rive; 5 | 6 | Core* TransitionBoolConditionBase::clone() const 7 | { 8 | auto cloned = new TransitionBoolCondition(); 9 | cloned->copy(*this); 10 | return cloned; 11 | } 12 | -------------------------------------------------------------------------------- /src/generated/data_bind/bindable_property_boolean_base.cpp: -------------------------------------------------------------------------------- 1 | #include "rive/generated/data_bind/bindable_property_boolean_base.hpp" 2 | #include "rive/data_bind/bindable_property_boolean.hpp" 3 | 4 | using namespace rive; 5 | 6 | Core* BindablePropertyBooleanBase::clone() const 7 | { 8 | auto cloned = new BindablePropertyBoolean(); 9 | cloned->copy(*this); 10 | return cloned; 11 | } 12 | -------------------------------------------------------------------------------- /src/generated/viewmodel/viewmodel_instance_number_base.cpp: -------------------------------------------------------------------------------- 1 | #include "rive/generated/viewmodel/viewmodel_instance_number_base.hpp" 2 | #include "rive/viewmodel/viewmodel_instance_number.hpp" 3 | 4 | using namespace rive; 5 | 6 | Core* ViewModelInstanceNumberBase::clone() const 7 | { 8 | auto cloned = new ViewModelInstanceNumber(); 9 | cloned->copy(*this); 10 | return cloned; 11 | } 12 | -------------------------------------------------------------------------------- /src/generated/viewmodel/viewmodel_instance_string_base.cpp: -------------------------------------------------------------------------------- 1 | #include "rive/generated/viewmodel/viewmodel_instance_string_base.hpp" 2 | #include "rive/viewmodel/viewmodel_instance_string.hpp" 3 | 4 | using namespace rive; 5 | 6 | Core* ViewModelInstanceStringBase::clone() const 7 | { 8 | auto cloned = new ViewModelInstanceString(); 9 | cloned->copy(*this); 10 | return cloned; 11 | } 12 | -------------------------------------------------------------------------------- /src/generated/viewmodel/viewmodel_property_number_base.cpp: -------------------------------------------------------------------------------- 1 | #include "rive/generated/viewmodel/viewmodel_property_number_base.hpp" 2 | #include "rive/viewmodel/viewmodel_property_number.hpp" 3 | 4 | using namespace rive; 5 | 6 | Core* ViewModelPropertyNumberBase::clone() const 7 | { 8 | auto cloned = new ViewModelPropertyNumber(); 9 | cloned->copy(*this); 10 | return cloned; 11 | } 12 | -------------------------------------------------------------------------------- /src/generated/viewmodel/viewmodel_property_string_base.cpp: -------------------------------------------------------------------------------- 1 | #include "rive/generated/viewmodel/viewmodel_property_string_base.hpp" 2 | #include "rive/viewmodel/viewmodel_property_string.hpp" 3 | 4 | using namespace rive; 5 | 6 | Core* ViewModelPropertyStringBase::clone() const 7 | { 8 | auto cloned = new ViewModelPropertyString(); 9 | cloned->copy(*this); 10 | return cloned; 11 | } 12 | -------------------------------------------------------------------------------- /include/rive/data_bind/bindable_property_boolean.hpp: -------------------------------------------------------------------------------- 1 | #ifndef _RIVE_BINDABLE_PROPERTY_BOOLEAN_HPP_ 2 | #define _RIVE_BINDABLE_PROPERTY_BOOLEAN_HPP_ 3 | #include "rive/generated/data_bind/bindable_property_boolean_base.hpp" 4 | #include 5 | namespace rive 6 | { 7 | class BindablePropertyBoolean : public BindablePropertyBooleanBase 8 | { 9 | public: 10 | }; 11 | } // namespace rive 12 | 13 | #endif -------------------------------------------------------------------------------- /src/generated/viewmodel/viewmodel_instance_boolean_base.cpp: -------------------------------------------------------------------------------- 1 | #include "rive/generated/viewmodel/viewmodel_instance_boolean_base.hpp" 2 | #include "rive/viewmodel/viewmodel_instance_boolean.hpp" 3 | 4 | using namespace rive; 5 | 6 | Core* ViewModelInstanceBooleanBase::clone() const 7 | { 8 | auto cloned = new ViewModelInstanceBoolean(); 9 | cloned->copy(*this); 10 | return cloned; 11 | } 12 | -------------------------------------------------------------------------------- /src/generated/viewmodel/viewmodel_property_boolean_base.cpp: -------------------------------------------------------------------------------- 1 | #include "rive/generated/viewmodel/viewmodel_property_boolean_base.hpp" 2 | #include "rive/viewmodel/viewmodel_property_boolean.hpp" 3 | 4 | using namespace rive; 5 | 6 | Core* ViewModelPropertyBooleanBase::clone() const 7 | { 8 | auto cloned = new ViewModelPropertyBoolean(); 9 | cloned->copy(*this); 10 | return cloned; 11 | } 12 | -------------------------------------------------------------------------------- /src/simple_array.cpp: -------------------------------------------------------------------------------- 1 | #ifdef TESTING 2 | #include "rive/simple_array.hpp" 3 | namespace rive 4 | { 5 | namespace SimpleArrayTesting 6 | { 7 | int mallocCount = 0; 8 | int reallocCount = 0; 9 | int freeCount = 0; 10 | void resetCounters() 11 | { 12 | mallocCount = 0; 13 | reallocCount = 0; 14 | freeCount = 0; 15 | } 16 | } // namespace SimpleArrayTesting 17 | } // namespace rive 18 | 19 | #endif -------------------------------------------------------------------------------- /dev/defs/animation/nested_trigger.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "NestedTrigger", 3 | "key": { 4 | "int": 122, 5 | "string": "nestedTrigger" 6 | }, 7 | "extends": "animation/nested_input.json", 8 | "properties": { 9 | "fire": { 10 | "type": "callback", 11 | "animates": true, 12 | "key": { 13 | "int": 401, 14 | "string": "fire" 15 | } 16 | } 17 | } 18 | } -------------------------------------------------------------------------------- /dev/defs/bones/bone.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Bone", 3 | "key": { 4 | "int": 40, 5 | "string": "bone" 6 | }, 7 | "extends": "bones/skeletal_component.json", 8 | "properties": { 9 | "length": { 10 | "type": "double", 11 | "initialValue": "0", 12 | "animates": true, 13 | "key": { 14 | "int": 89, 15 | "string": "length" 16 | } 17 | } 18 | } 19 | } -------------------------------------------------------------------------------- /include/rive/viewmodel/data_enum_value.hpp: -------------------------------------------------------------------------------- 1 | #ifndef _RIVE_DATA_ENUM_VALUE_HPP_ 2 | #define _RIVE_DATA_ENUM_VALUE_HPP_ 3 | #include "rive/generated/viewmodel/data_enum_value_base.hpp" 4 | #include 5 | namespace rive 6 | { 7 | class DataEnumValue : public DataEnumValueBase 8 | { 9 | public: 10 | StatusCode import(ImportStack& importStack) override; 11 | }; 12 | } // namespace rive 13 | 14 | #endif -------------------------------------------------------------------------------- /include/rive/viewmodel/viewmodel_property_number.hpp: -------------------------------------------------------------------------------- 1 | #ifndef _RIVE_VIEW_MODEL_PROPERTY_NUMBER_HPP_ 2 | #define _RIVE_VIEW_MODEL_PROPERTY_NUMBER_HPP_ 3 | #include "rive/generated/viewmodel/viewmodel_property_number_base.hpp" 4 | #include 5 | namespace rive 6 | { 7 | class ViewModelPropertyNumber : public ViewModelPropertyNumberBase 8 | { 9 | public: 10 | }; 11 | } // namespace rive 12 | 13 | #endif -------------------------------------------------------------------------------- /include/rive/viewmodel/viewmodel_property_string.hpp: -------------------------------------------------------------------------------- 1 | #ifndef _RIVE_VIEW_MODEL_PROPERTY_STRING_HPP_ 2 | #define _RIVE_VIEW_MODEL_PROPERTY_STRING_HPP_ 3 | #include "rive/generated/viewmodel/viewmodel_property_string_base.hpp" 4 | #include 5 | namespace rive 6 | { 7 | class ViewModelPropertyString : public ViewModelPropertyStringBase 8 | { 9 | public: 10 | }; 11 | } // namespace rive 12 | 13 | #endif -------------------------------------------------------------------------------- /skia/dependencies/make_gl3w.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | set -e 4 | 5 | # GL3W requires CMake 6 | 7 | GL3W_REPO=https://github.com/skaslev/gl3w 8 | GL3W_STABLE_BRANCH=master 9 | 10 | if [ ! -d gl3w ]; then 11 | echo "Cloning gl3w." 12 | git clone $GL3W_REPO 13 | fi 14 | 15 | cd gl3w && git checkout $GL3W_STABLE_BRANCH && git fetch && git pull 16 | 17 | mkdir -p build 18 | cd build 19 | cmake ../ 20 | make -------------------------------------------------------------------------------- /src/generated/animation/transition_number_condition_base.cpp: -------------------------------------------------------------------------------- 1 | #include "rive/generated/animation/transition_number_condition_base.hpp" 2 | #include "rive/animation/transition_number_condition.hpp" 3 | 4 | using namespace rive; 5 | 6 | Core* TransitionNumberConditionBase::clone() const 7 | { 8 | auto cloned = new TransitionNumberCondition(); 9 | cloned->copy(*this); 10 | return cloned; 11 | } 12 | -------------------------------------------------------------------------------- /src/generated/data_bind/converters/data_converter_group_base.cpp: -------------------------------------------------------------------------------- 1 | #include "rive/generated/data_bind/converters/data_converter_group_base.hpp" 2 | #include "rive/data_bind/converters/data_converter_group.hpp" 3 | 4 | using namespace rive; 5 | 6 | Core* DataConverterGroupBase::clone() const 7 | { 8 | auto cloned = new DataConverterGroup(); 9 | cloned->copy(*this); 10 | return cloned; 11 | } 12 | -------------------------------------------------------------------------------- /include/rive/viewmodel/viewmodel_property_boolean.hpp: -------------------------------------------------------------------------------- 1 | #ifndef _RIVE_VIEW_MODEL_PROPERTY_BOOLEAN_HPP_ 2 | #define _RIVE_VIEW_MODEL_PROPERTY_BOOLEAN_HPP_ 3 | #include "rive/generated/viewmodel/viewmodel_property_boolean_base.hpp" 4 | #include 5 | namespace rive 6 | { 7 | class ViewModelPropertyBoolean : public ViewModelPropertyBooleanBase 8 | { 9 | public: 10 | }; 11 | } // namespace rive 12 | 13 | #endif -------------------------------------------------------------------------------- /src/generated/animation/cubic_interpolator_component_base.cpp: -------------------------------------------------------------------------------- 1 | #include "rive/generated/animation/cubic_interpolator_component_base.hpp" 2 | #include "rive/animation/cubic_interpolator_component.hpp" 3 | 4 | using namespace rive; 5 | 6 | Core* CubicInterpolatorComponentBase::clone() const 7 | { 8 | auto cloned = new CubicInterpolatorComponent(); 9 | cloned->copy(*this); 10 | return cloned; 11 | } 12 | -------------------------------------------------------------------------------- /src/generated/animation/transition_trigger_condition_base.cpp: -------------------------------------------------------------------------------- 1 | #include "rive/generated/animation/transition_trigger_condition_base.hpp" 2 | #include "rive/animation/transition_trigger_condition.hpp" 3 | 4 | using namespace rive; 5 | 6 | Core* TransitionTriggerConditionBase::clone() const 7 | { 8 | auto cloned = new TransitionTriggerCondition(); 9 | cloned->copy(*this); 10 | return cloned; 11 | } 12 | -------------------------------------------------------------------------------- /src/generated/viewmodel/viewmodel_instance_list_item_base.cpp: -------------------------------------------------------------------------------- 1 | #include "rive/generated/viewmodel/viewmodel_instance_list_item_base.hpp" 2 | #include "rive/viewmodel/viewmodel_instance_list_item.hpp" 3 | 4 | using namespace rive; 5 | 6 | Core* ViewModelInstanceListItemBase::clone() const 7 | { 8 | auto cloned = new ViewModelInstanceListItem(); 9 | cloned->copy(*this); 10 | return cloned; 11 | } 12 | -------------------------------------------------------------------------------- /src/generated/viewmodel/viewmodel_instance_viewmodel_base.cpp: -------------------------------------------------------------------------------- 1 | #include "rive/generated/viewmodel/viewmodel_instance_viewmodel_base.hpp" 2 | #include "rive/viewmodel/viewmodel_instance_viewmodel.hpp" 3 | 4 | using namespace rive; 5 | 6 | Core* ViewModelInstanceViewModelBase::clone() const 7 | { 8 | auto cloned = new ViewModelInstanceViewModel(); 9 | cloned->copy(*this); 10 | return cloned; 11 | } 12 | -------------------------------------------------------------------------------- /src/generated/viewmodel/viewmodel_property_viewmodel_base.cpp: -------------------------------------------------------------------------------- 1 | #include "rive/generated/viewmodel/viewmodel_property_viewmodel_base.hpp" 2 | #include "rive/viewmodel/viewmodel_property_viewmodel.hpp" 3 | 4 | using namespace rive; 5 | 6 | Core* ViewModelPropertyViewModelBase::clone() const 7 | { 8 | auto cloned = new ViewModelPropertyViewModel(); 9 | cloned->copy(*this); 10 | return cloned; 11 | } 12 | -------------------------------------------------------------------------------- /dev/defs/animation/keyframe_color.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "KeyFrameColor", 3 | "key": { 4 | "int": 37, 5 | "string": "keyframecolor" 6 | }, 7 | "extends": "animation/interpolating_keyframe.json", 8 | "properties": { 9 | "value": { 10 | "type": "Color", 11 | "initialValue": "0", 12 | "key": { 13 | "int": 88, 14 | "string": "value" 15 | } 16 | } 17 | } 18 | } -------------------------------------------------------------------------------- /dev/defs/shapes/path.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Path", 3 | "key": { 4 | "int": 12, 5 | "string": "path" 6 | }, 7 | "abstract": true, 8 | "extends": "node.json", 9 | "properties": { 10 | "pathFlags": { 11 | "type": "uint", 12 | "initialValue": "0", 13 | "key": { 14 | "int": 128, 15 | "string": "pathflags" 16 | }, 17 | "coop": false 18 | } 19 | } 20 | } -------------------------------------------------------------------------------- /include/rive/animation/transition_condition_op.hpp: -------------------------------------------------------------------------------- 1 | #ifndef _RIVE_TRANSITION_CONDITION_OP_HPP_ 2 | #define _RIVE_TRANSITION_CONDITION_OP_HPP_ 3 | 4 | namespace rive 5 | { 6 | enum class TransitionConditionOp : int 7 | { 8 | equal = 0, 9 | notEqual = 1, 10 | lessThanOrEqual = 2, 11 | greaterThanOrEqual = 3, 12 | lessThan = 4, 13 | greaterThan = 5 14 | }; 15 | } // namespace rive 16 | 17 | #endif -------------------------------------------------------------------------------- /include/rive/animation/transition_value_comparator.hpp: -------------------------------------------------------------------------------- 1 | #ifndef _RIVE_TRANSITION_VALUE_COMPARATOR_HPP_ 2 | #define _RIVE_TRANSITION_VALUE_COMPARATOR_HPP_ 3 | #include "rive/generated/animation/transition_value_comparator_base.hpp" 4 | #include 5 | namespace rive 6 | { 7 | class TransitionValueComparator : public TransitionValueComparatorBase 8 | { 9 | public: 10 | }; 11 | } // namespace rive 12 | 13 | #endif -------------------------------------------------------------------------------- /include/rive/text/text_style_feature.hpp: -------------------------------------------------------------------------------- 1 | #ifndef _RIVE_TEXT_STYLE_FEATURE_HPP_ 2 | #define _RIVE_TEXT_STYLE_FEATURE_HPP_ 3 | #include "rive/generated/text/text_style_feature_base.hpp" 4 | #include 5 | namespace rive 6 | { 7 | class TextStyleFeature : public TextStyleFeatureBase 8 | { 9 | public: 10 | StatusCode onAddedDirty(CoreContext* context) override; 11 | }; 12 | } // namespace rive 13 | 14 | #endif -------------------------------------------------------------------------------- /src/generated/animation/transition_artboard_condition_base.cpp: -------------------------------------------------------------------------------- 1 | #include "rive/generated/animation/transition_artboard_condition_base.hpp" 2 | #include "rive/animation/transition_artboard_condition.hpp" 3 | 4 | using namespace rive; 5 | 6 | Core* TransitionArtboardConditionBase::clone() const 7 | { 8 | auto cloned = new TransitionArtboardCondition(); 9 | cloned->copy(*this); 10 | return cloned; 11 | } 12 | -------------------------------------------------------------------------------- /src/generated/data_bind/converters/data_converter_rounder_base.cpp: -------------------------------------------------------------------------------- 1 | #include "rive/generated/data_bind/converters/data_converter_rounder_base.hpp" 2 | #include "rive/data_bind/converters/data_converter_rounder.hpp" 3 | 4 | using namespace rive; 5 | 6 | Core* DataConverterRounderBase::clone() const 7 | { 8 | auto cloned = new DataConverterRounder(); 9 | cloned->copy(*this); 10 | return cloned; 11 | } 12 | -------------------------------------------------------------------------------- /dev/defs/animation/blend_animation_1d.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "BlendAnimation1D", 3 | "key": { 4 | "int": 75, 5 | "string": "blendanimation1d" 6 | }, 7 | "extends": "animation/blend_animation.json", 8 | "properties": { 9 | "value": { 10 | "type": "double", 11 | "initialValue": "0", 12 | "key": { 13 | "int": 166, 14 | "string": "value" 15 | } 16 | } 17 | } 18 | } -------------------------------------------------------------------------------- /dev/defs/animation/keyframe_double.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "KeyFrameDouble", 3 | "key": { 4 | "int": 30, 5 | "string": "keyframedouble" 6 | }, 7 | "extends": "animation/interpolating_keyframe.json", 8 | "properties": { 9 | "value": { 10 | "type": "double", 11 | "initialValue": "0", 12 | "key": { 13 | "int": 70, 14 | "string": "value" 15 | } 16 | } 17 | } 18 | } -------------------------------------------------------------------------------- /include/rive/animation/transition_value_enum_comparator.hpp: -------------------------------------------------------------------------------- 1 | #ifndef _RIVE_TRANSITION_VALUE_ENUM_COMPARATOR_HPP_ 2 | #define _RIVE_TRANSITION_VALUE_ENUM_COMPARATOR_HPP_ 3 | #include "rive/generated/animation/transition_value_enum_comparator_base.hpp" 4 | #include 5 | namespace rive 6 | { 7 | class TransitionValueEnumComparator : public TransitionValueEnumComparatorBase 8 | {}; 9 | } // namespace rive 10 | 11 | #endif -------------------------------------------------------------------------------- /include/rive/core/field_types/core_bytes_type.hpp: -------------------------------------------------------------------------------- 1 | #ifndef _RIVE_CORE_BYTES_TYPE_HPP_ 2 | #define _RIVE_CORE_BYTES_TYPE_HPP_ 3 | 4 | #include "rive/span.hpp" 5 | #include 6 | 7 | namespace rive 8 | { 9 | class BinaryReader; 10 | class CoreBytesType 11 | { 12 | public: 13 | static const int id = 1; 14 | static Span deserialize(BinaryReader& reader); 15 | }; 16 | } // namespace rive 17 | #endif -------------------------------------------------------------------------------- /include/rive/shapes/mesh_vertex.hpp: -------------------------------------------------------------------------------- 1 | #ifndef _RIVE_MESH_VERTEX_HPP_ 2 | #define _RIVE_MESH_VERTEX_HPP_ 3 | #include "rive/generated/shapes/mesh_vertex_base.hpp" 4 | #include 5 | namespace rive 6 | { 7 | class MeshVertex : public MeshVertexBase 8 | { 9 | public: 10 | void markGeometryDirty() override; 11 | StatusCode onAddedDirty(CoreContext* context) override; 12 | }; 13 | } // namespace rive 14 | 15 | #endif -------------------------------------------------------------------------------- /src/generated/animation/transition_viewmodel_condition_base.cpp: -------------------------------------------------------------------------------- 1 | #include "rive/generated/animation/transition_viewmodel_condition_base.hpp" 2 | #include "rive/animation/transition_viewmodel_condition.hpp" 3 | 4 | using namespace rive; 5 | 6 | Core* TransitionViewModelConditionBase::clone() const 7 | { 8 | auto cloned = new TransitionViewModelCondition(); 9 | cloned->copy(*this); 10 | return cloned; 11 | } 12 | -------------------------------------------------------------------------------- /src/generated/data_bind/converters/data_converter_to_string_base.cpp: -------------------------------------------------------------------------------- 1 | #include "rive/generated/data_bind/converters/data_converter_to_string_base.hpp" 2 | #include "rive/data_bind/converters/data_converter_to_string.hpp" 3 | 4 | using namespace rive; 5 | 6 | Core* DataConverterToStringBase::clone() const 7 | { 8 | auto cloned = new DataConverterToString(); 9 | cloned->copy(*this); 10 | return cloned; 11 | } 12 | -------------------------------------------------------------------------------- /include/rive/animation/transition_artboard_condition.hpp: -------------------------------------------------------------------------------- 1 | #ifndef _RIVE_TRANSITION_ARTBOARD_CONDITION_HPP_ 2 | #define _RIVE_TRANSITION_ARTBOARD_CONDITION_HPP_ 3 | #include "rive/generated/animation/transition_artboard_condition_base.hpp" 4 | #include 5 | namespace rive 6 | { 7 | class TransitionArtboardCondition : public TransitionArtboardConditionBase 8 | { 9 | public: 10 | }; 11 | } // namespace rive 12 | 13 | #endif -------------------------------------------------------------------------------- /include/rive/viewmodel/viewmodel_property.hpp: -------------------------------------------------------------------------------- 1 | #ifndef _RIVE_VIEW_MODEL_PROPERTY_HPP_ 2 | #define _RIVE_VIEW_MODEL_PROPERTY_HPP_ 3 | #include "rive/generated/viewmodel/viewmodel_property_base.hpp" 4 | #include 5 | namespace rive 6 | { 7 | class ViewModelProperty : public ViewModelPropertyBase 8 | { 9 | public: 10 | StatusCode import(ImportStack& importStack) override; 11 | }; 12 | } // namespace rive 13 | 14 | #endif -------------------------------------------------------------------------------- /include/rive/viewmodel/viewmodel_property_viewmodel.hpp: -------------------------------------------------------------------------------- 1 | #ifndef _RIVE_VIEW_MODEL_PROPERTY_VIEW_MODEL_HPP_ 2 | #define _RIVE_VIEW_MODEL_PROPERTY_VIEW_MODEL_HPP_ 3 | #include "rive/generated/viewmodel/viewmodel_property_viewmodel_base.hpp" 4 | #include 5 | namespace rive 6 | { 7 | class ViewModelPropertyViewModel : public ViewModelPropertyViewModelBase 8 | { 9 | public: 10 | }; 11 | } // namespace rive 12 | 13 | #endif -------------------------------------------------------------------------------- /src/generated/data_bind/converters/data_converter_group_item_base.cpp: -------------------------------------------------------------------------------- 1 | #include "rive/generated/data_bind/converters/data_converter_group_item_base.hpp" 2 | #include "rive/data_bind/converters/data_converter_group_item.hpp" 3 | 4 | using namespace rive; 5 | 6 | Core* DataConverterGroupItemBase::clone() const 7 | { 8 | auto cloned = new DataConverterGroupItem(); 9 | cloned->copy(*this); 10 | return cloned; 11 | } 12 | -------------------------------------------------------------------------------- /src/generated/data_bind/converters/data_converter_operation_base.cpp: -------------------------------------------------------------------------------- 1 | #include "rive/generated/data_bind/converters/data_converter_operation_base.hpp" 2 | #include "rive/data_bind/converters/data_converter_operation.hpp" 3 | 4 | using namespace rive; 5 | 6 | Core* DataConverterOperationBase::clone() const 7 | { 8 | auto cloned = new DataConverterOperation(); 9 | cloned->copy(*this); 10 | return cloned; 11 | } 12 | -------------------------------------------------------------------------------- /dev/core_generator/lib/src/field_types/callback_field_type.dart: -------------------------------------------------------------------------------- 1 | import 'package:core_generator/src/field_type.dart'; 2 | 3 | class CallbackFieldType extends FieldType { 4 | CallbackFieldType() 5 | : super( 6 | 'callback', 7 | 'CoreCallbackType', 8 | cppName: 'CallbackData', 9 | storesData: false, 10 | ); 11 | 12 | @override 13 | String get defaultValue => '0'; 14 | } 15 | -------------------------------------------------------------------------------- /dev/defs/shapes/paint/solid_color.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "SolidColor", 3 | "key": { 4 | "int": 18, 5 | "string": "solidcolor" 6 | }, 7 | "extends": "component.json", 8 | "properties": { 9 | "colorValue": { 10 | "type": "Color", 11 | "initialValue": "0xFF747474", 12 | "animates": true, 13 | "key": { 14 | "int": 37, 15 | "string": "color" 16 | } 17 | } 18 | } 19 | } -------------------------------------------------------------------------------- /include/rive/animation/nested_trigger.hpp: -------------------------------------------------------------------------------- 1 | #ifndef _RIVE_NESTED_TRIGGER_HPP_ 2 | #define _RIVE_NESTED_TRIGGER_HPP_ 3 | #include "rive/generated/animation/nested_trigger_base.hpp" 4 | #include 5 | namespace rive 6 | { 7 | class NestedTrigger : public NestedTriggerBase 8 | { 9 | public: 10 | void applyValue() override; 11 | void fire(const CallbackData& value) override; 12 | }; 13 | } // namespace rive 14 | 15 | #endif -------------------------------------------------------------------------------- /include/rive/animation/transition_property_comparator.hpp: -------------------------------------------------------------------------------- 1 | #ifndef _RIVE_TRANSITION_PROPERTY_COMPARATOR_HPP_ 2 | #define _RIVE_TRANSITION_PROPERTY_COMPARATOR_HPP_ 3 | #include "rive/generated/animation/transition_property_comparator_base.hpp" 4 | #include 5 | namespace rive 6 | { 7 | class TransitionPropertyComparator : public TransitionPropertyComparatorBase 8 | { 9 | public: 10 | }; 11 | } // namespace rive 12 | 13 | #endif -------------------------------------------------------------------------------- /src/generated/animation/transition_value_enum_comparator_base.cpp: -------------------------------------------------------------------------------- 1 | #include "rive/generated/animation/transition_value_enum_comparator_base.hpp" 2 | #include "rive/animation/transition_value_enum_comparator.hpp" 3 | 4 | using namespace rive; 5 | 6 | Core* TransitionValueEnumComparatorBase::clone() const 7 | { 8 | auto cloned = new TransitionValueEnumComparator(); 9 | cloned->copy(*this); 10 | return cloned; 11 | } 12 | -------------------------------------------------------------------------------- /dependencies/windows/get_premake5.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | pushd %DEPENDENCIES% 3 | if not exist ".\bin" mkdir bin 4 | echo Downloading Premake5 5 | curl https://github.com/premake/premake-core/releases/download/v5.0.0-beta1/premake-5.0.0-beta1-windows.zip -L -o .\bin\premake_windows.zip 6 | pushd bin 7 | :: Export premake5 into bin 8 | tar -xf premake_windows.zip 9 | :: Delete downloaded archive 10 | del premake_windows.zip 11 | popd 12 | popd -------------------------------------------------------------------------------- /src/generated/animation/transition_value_color_comparator_base.cpp: -------------------------------------------------------------------------------- 1 | #include "rive/generated/animation/transition_value_color_comparator_base.hpp" 2 | #include "rive/animation/transition_value_color_comparator.hpp" 3 | 4 | using namespace rive; 5 | 6 | Core* TransitionValueColorComparatorBase::clone() const 7 | { 8 | auto cloned = new TransitionValueColorComparator(); 9 | cloned->copy(*this); 10 | return cloned; 11 | } 12 | -------------------------------------------------------------------------------- /dependencies/jconfig.h: -------------------------------------------------------------------------------- 1 | #include // Required on Mac -- libjpg expects FILE to be already defined. 2 | 3 | #define HAVE_PROTOTYPES 4 | #define HAVE_UNSIGNED_CHAR 5 | #define HAVE_UNSIGNED_SHORT 6 | #undef CHAR_IS_UNSIGNED 7 | #define HAVE_STDDEF_H 8 | #define HAVE_STDLIB_H 9 | #undef NEED_BSD_STRINGS 10 | #undef NEED_SYS_TYPES_H 11 | #undef NEED_FAR_POINTERS 12 | #undef NEED_SHORT_EXTERNAL_NAMES 13 | #undef INCOMPLETE_TYPES_BROKEN 14 | -------------------------------------------------------------------------------- /dev/defs/animation/advanceable_state.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "AdvanceableState", 3 | "key": { 4 | "int": 145, 5 | "string": "advanceablestate" 6 | }, 7 | "abstract": true, 8 | "extends": "animation/layer_state.json", 9 | "properties": { 10 | "speed": { 11 | "type": "double", 12 | "initialValue": "1", 13 | "key": { 14 | "int": 292, 15 | "string": "speed" 16 | } 17 | } 18 | } 19 | } -------------------------------------------------------------------------------- /include/rive/nested_artboard_leaf.hpp: -------------------------------------------------------------------------------- 1 | #ifndef _RIVE_NESTED_ARTBOARD_LEAF_HPP_ 2 | #define _RIVE_NESTED_ARTBOARD_LEAF_HPP_ 3 | #include "rive/generated/nested_artboard_leaf_base.hpp" 4 | #include 5 | namespace rive 6 | { 7 | class NestedArtboardLeaf : public NestedArtboardLeafBase 8 | { 9 | public: 10 | Core* clone() const override; 11 | void update(ComponentDirt value) override; 12 | }; 13 | } // namespace rive 14 | 15 | #endif -------------------------------------------------------------------------------- /src/generated/animation/transition_value_number_comparator_base.cpp: -------------------------------------------------------------------------------- 1 | #include "rive/generated/animation/transition_value_number_comparator_base.hpp" 2 | #include "rive/animation/transition_value_number_comparator.hpp" 3 | 4 | using namespace rive; 5 | 6 | Core* TransitionValueNumberComparatorBase::clone() const 7 | { 8 | auto cloned = new TransitionValueNumberComparator(); 9 | cloned->copy(*this); 10 | return cloned; 11 | } 12 | -------------------------------------------------------------------------------- /src/generated/animation/transition_value_string_comparator_base.cpp: -------------------------------------------------------------------------------- 1 | #include "rive/generated/animation/transition_value_string_comparator_base.hpp" 2 | #include "rive/animation/transition_value_string_comparator.hpp" 3 | 4 | using namespace rive; 5 | 6 | Core* TransitionValueStringComparatorBase::clone() const 7 | { 8 | auto cloned = new TransitionValueStringComparator(); 9 | cloned->copy(*this); 10 | return cloned; 11 | } 12 | -------------------------------------------------------------------------------- /src/importers/enum_importer.cpp: -------------------------------------------------------------------------------- 1 | #include "rive/importers/enum_importer.hpp" 2 | #include "rive/viewmodel/data_enum.hpp" 3 | #include "rive/viewmodel/data_enum_value.hpp" 4 | 5 | using namespace rive; 6 | 7 | EnumImporter::EnumImporter(DataEnum* dataEnum) : m_DataEnum(dataEnum) {} 8 | 9 | void EnumImporter::addValue(DataEnumValue* value) { m_DataEnum->addValue(value); } 10 | 11 | StatusCode EnumImporter::resolve() { return StatusCode::Ok; } -------------------------------------------------------------------------------- /dev/defs/animation/keyframe_uint.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "KeyFrameUint", 3 | "key": { 4 | "int": 450, 5 | "string": "keyframeuint" 6 | }, 7 | "extends": "animation/interpolating_keyframe.json", 8 | "properties": { 9 | "value": { 10 | "type": "uint", 11 | "typeRuntime": "uint", 12 | "initialValue": "0", 13 | "key": { 14 | "int": 631, 15 | "string": "value" 16 | } 17 | } 18 | } 19 | } -------------------------------------------------------------------------------- /include/rive/animation/blend_state_direct.hpp: -------------------------------------------------------------------------------- 1 | #ifndef _RIVE_BLEND_STATE_DIRECT_HPP_ 2 | #define _RIVE_BLEND_STATE_DIRECT_HPP_ 3 | #include "rive/generated/animation/blend_state_direct_base.hpp" 4 | #include 5 | namespace rive 6 | { 7 | class BlendStateDirect : public BlendStateDirectBase 8 | { 9 | public: 10 | std::unique_ptr makeInstance(ArtboardInstance*) const override; 11 | }; 12 | } // namespace rive 13 | 14 | #endif -------------------------------------------------------------------------------- /include/rive/animation/nested_simple_animation.hpp: -------------------------------------------------------------------------------- 1 | #ifndef _RIVE_NESTED_SIMPLE_ANIMATION_HPP_ 2 | #define _RIVE_NESTED_SIMPLE_ANIMATION_HPP_ 3 | #include "rive/generated/animation/nested_simple_animation_base.hpp" 4 | #include 5 | namespace rive 6 | { 7 | class NestedSimpleAnimation : public NestedSimpleAnimationBase 8 | { 9 | public: 10 | bool advance(float elapsedSeconds) override; 11 | }; 12 | } // namespace rive 13 | 14 | #endif -------------------------------------------------------------------------------- /include/rive/constraints/transform_component_constraint_y.hpp: -------------------------------------------------------------------------------- 1 | #ifndef _RIVE_TRANSFORM_COMPONENT_CONSTRAINT_Y_HPP_ 2 | #define _RIVE_TRANSFORM_COMPONENT_CONSTRAINT_Y_HPP_ 3 | #include "rive/generated/constraints/transform_component_constraint_y_base.hpp" 4 | #include 5 | namespace rive 6 | { 7 | class TransformComponentConstraintY : public TransformComponentConstraintYBase 8 | { 9 | public: 10 | }; 11 | } // namespace rive 12 | 13 | #endif -------------------------------------------------------------------------------- /include/rive/viewmodel/viewmodel_instance_color.hpp: -------------------------------------------------------------------------------- 1 | #ifndef _RIVE_VIEW_MODEL_INSTANCE_COLOR_HPP_ 2 | #define _RIVE_VIEW_MODEL_INSTANCE_COLOR_HPP_ 3 | #include "rive/generated/viewmodel/viewmodel_instance_color_base.hpp" 4 | #include 5 | namespace rive 6 | { 7 | class ViewModelInstanceColor : public ViewModelInstanceColorBase 8 | { 9 | public: 10 | void propertyValueChanged() override; 11 | }; 12 | } // namespace rive 13 | 14 | #endif -------------------------------------------------------------------------------- /src/generated/animation/transition_value_boolean_comparator_base.cpp: -------------------------------------------------------------------------------- 1 | #include "rive/generated/animation/transition_value_boolean_comparator_base.hpp" 2 | #include "rive/animation/transition_value_boolean_comparator.hpp" 3 | 4 | using namespace rive; 5 | 6 | Core* TransitionValueBooleanComparatorBase::clone() const 7 | { 8 | auto cloned = new TransitionValueBooleanComparator(); 9 | cloned->copy(*this); 10 | return cloned; 11 | } 12 | -------------------------------------------------------------------------------- /dev/defs/animation/keyframe_bool.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "KeyFrameBool", 3 | "key": { 4 | "int": 84, 5 | "string": "keyframebool" 6 | }, 7 | "extends": "animation/interpolating_keyframe.json", 8 | "properties": { 9 | "value": { 10 | "type": "bool", 11 | "typeRuntime": "bool", 12 | "initialValue": "false", 13 | "key": { 14 | "int": 181, 15 | "string": "value" 16 | } 17 | } 18 | } 19 | } -------------------------------------------------------------------------------- /dev/defs/custom_property_number.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "CustomPropertyNumber", 3 | "key": { 4 | "int": 127, 5 | "string": "custompropertynumber" 6 | }, 7 | "extends": "custom_property.json", 8 | "properties": { 9 | "propertyValue": { 10 | "type": "double", 11 | "initialValue": "0", 12 | "animates": true, 13 | "key": { 14 | "int": 243, 15 | "string": "value" 16 | } 17 | } 18 | } 19 | } -------------------------------------------------------------------------------- /dev/defs/custom_property_string.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "CustomPropertyString", 3 | "key": { 4 | "int": 130, 5 | "string": "custompropertystring" 6 | }, 7 | "extends": "custom_property.json", 8 | "properties": { 9 | "propertyValue": { 10 | "type": "String", 11 | "initialValue": "''", 12 | "animates": true, 13 | "key": { 14 | "int": 246, 15 | "string": "value" 16 | } 17 | } 18 | } 19 | } -------------------------------------------------------------------------------- /include/rive/hit_info.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2022 Rive 3 | */ 4 | 5 | #ifndef _RIVE_HITINFO_HPP_ 6 | #define _RIVE_HITINFO_HPP_ 7 | 8 | #include "rive/math/aabb.hpp" 9 | #include 10 | 11 | namespace rive 12 | { 13 | 14 | class NestedArtboard; 15 | 16 | struct HitInfo 17 | { 18 | IAABB area; // input 19 | std::vector mounts; // output 20 | }; 21 | 22 | } // namespace rive 23 | #endif 24 | -------------------------------------------------------------------------------- /include/rive/viewmodel/viewmodel_instance_string.hpp: -------------------------------------------------------------------------------- 1 | #ifndef _RIVE_VIEW_MODEL_INSTANCE_STRING_HPP_ 2 | #define _RIVE_VIEW_MODEL_INSTANCE_STRING_HPP_ 3 | #include "rive/generated/viewmodel/viewmodel_instance_string_base.hpp" 4 | #include 5 | namespace rive 6 | { 7 | class ViewModelInstanceString : public ViewModelInstanceStringBase 8 | { 9 | public: 10 | void propertyValueChanged() override; 11 | }; 12 | } // namespace rive 13 | 14 | #endif -------------------------------------------------------------------------------- /dev/defs/animation/keyframe_string.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "KeyFrameString", 3 | "key": { 4 | "int": 142, 5 | "string": "keyframestring" 6 | }, 7 | "extends": "animation/interpolating_keyframe.json", 8 | "properties": { 9 | "value": { 10 | "type": "String", 11 | "typeRuntime": "String", 12 | "initialValue": "''", 13 | "key": { 14 | "int": 280, 15 | "string": "value" 16 | } 17 | } 18 | } 19 | } -------------------------------------------------------------------------------- /dev/defs/animation/transition_number_condition.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "TransitionNumberCondition", 3 | "key": { 4 | "int": 70, 5 | "string": "transitionnumbercondition" 6 | }, 7 | "extends": "animation/transition_value_condition.json", 8 | "properties": { 9 | "value": { 10 | "type": "double", 11 | "initialValue": "0", 12 | "key": { 13 | "int": 157, 14 | "string": "value" 15 | } 16 | } 17 | } 18 | } -------------------------------------------------------------------------------- /dev/defs/custom_property_boolean.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "CustomPropertyBoolean", 3 | "key": { 4 | "int": 129, 5 | "string": "custompropertyboolean" 6 | }, 7 | "extends": "custom_property.json", 8 | "properties": { 9 | "propertyValue": { 10 | "type": "bool", 11 | "initialValue": "false", 12 | "animates": true, 13 | "key": { 14 | "int": 245, 15 | "string": "value" 16 | } 17 | } 18 | } 19 | } -------------------------------------------------------------------------------- /include/rive/bones/root_bone.hpp: -------------------------------------------------------------------------------- 1 | #ifndef _RIVE_ROOT_BONE_HPP_ 2 | #define _RIVE_ROOT_BONE_HPP_ 3 | #include "rive/generated/bones/root_bone_base.hpp" 4 | #include 5 | namespace rive 6 | { 7 | class RootBone : public RootBoneBase 8 | { 9 | public: 10 | StatusCode onAddedClean(CoreContext* context) override; 11 | 12 | protected: 13 | void xChanged() override; 14 | void yChanged() override; 15 | }; 16 | } // namespace rive 17 | 18 | #endif -------------------------------------------------------------------------------- /include/rive/constraints/translation_constraint.hpp: -------------------------------------------------------------------------------- 1 | #ifndef _RIVE_TRANSLATION_CONSTRAINT_HPP_ 2 | #define _RIVE_TRANSLATION_CONSTRAINT_HPP_ 3 | #include "rive/generated/constraints/translation_constraint_base.hpp" 4 | #include 5 | namespace rive 6 | { 7 | class TranslationConstraint : public TranslationConstraintBase 8 | { 9 | public: 10 | void constrain(TransformComponent* component) override; 11 | }; 12 | } // namespace rive 13 | 14 | #endif -------------------------------------------------------------------------------- /include/rive/viewmodel/viewmodel_instance_number.hpp: -------------------------------------------------------------------------------- 1 | #ifndef _RIVE_VIEW_MODEL_INSTANCE_NUMBER_HPP_ 2 | #define _RIVE_VIEW_MODEL_INSTANCE_NUMBER_HPP_ 3 | #include "rive/generated/viewmodel/viewmodel_instance_number_base.hpp" 4 | #include 5 | namespace rive 6 | { 7 | class ViewModelInstanceNumber : public ViewModelInstanceNumberBase 8 | { 9 | protected: 10 | void propertyValueChanged() override; 11 | }; 12 | } // namespace rive 13 | 14 | #endif -------------------------------------------------------------------------------- /dev/defs/shapes/paint/shape_paint.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "ShapePaint", 3 | "key": { 4 | "int": 21, 5 | "string": "shapePaint" 6 | }, 7 | "abstract": true, 8 | "extends": "container_component.json", 9 | "properties": { 10 | "isVisible": { 11 | "type": "bool", 12 | "initialValue": "true", 13 | "key": { 14 | "int": 41, 15 | "string": "isVisible" 16 | }, 17 | "virtual": true 18 | } 19 | } 20 | } -------------------------------------------------------------------------------- /include/rive/viewmodel/viewmodel_instance_boolean.hpp: -------------------------------------------------------------------------------- 1 | #ifndef _RIVE_VIEW_MODEL_INSTANCE_BOOLEAN_HPP_ 2 | #define _RIVE_VIEW_MODEL_INSTANCE_BOOLEAN_HPP_ 3 | #include "rive/generated/viewmodel/viewmodel_instance_boolean_base.hpp" 4 | #include 5 | namespace rive 6 | { 7 | class ViewModelInstanceBoolean : public ViewModelInstanceBooleanBase 8 | { 9 | protected: 10 | void propertyValueChanged() override; 11 | }; 12 | } // namespace rive 13 | 14 | #endif -------------------------------------------------------------------------------- /skia/renderer/include/cg_skia_factory.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2022 Rive 3 | */ 4 | 5 | #ifndef _RIVE_CGSkiaFactory_HPP_ 6 | #define _RIVE_CGSkiaFactory_HPP_ 7 | 8 | #include "skia_factory.hpp" 9 | 10 | namespace rive 11 | { 12 | struct CGSkiaFactory : public SkiaFactory 13 | { 14 | std::vector platformDecode(Span, SkiaFactory::ImageInfo*) override; 15 | }; 16 | } // namespace rive 17 | 18 | #endif // _RIVE_CGSkiaFactory_HPP_ 19 | -------------------------------------------------------------------------------- /dev/defs/animation/nested_bool.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "NestedBool", 3 | "key": { 4 | "int": 123, 5 | "string": "nestedBool" 6 | }, 7 | "extends": "animation/nested_input.json", 8 | "properties": { 9 | "nestedValue": { 10 | "type": "bool", 11 | "initialValue": "false", 12 | "animates": true, 13 | "pureVirtual": true, 14 | "key": { 15 | "int": 238, 16 | "string": "value" 17 | } 18 | } 19 | } 20 | } -------------------------------------------------------------------------------- /include/rive/solo.hpp: -------------------------------------------------------------------------------- 1 | #ifndef _RIVE_SOLO_HPP_ 2 | #define _RIVE_SOLO_HPP_ 3 | #include "rive/generated/solo_base.hpp" 4 | namespace rive 5 | { 6 | class Solo : public SoloBase 7 | { 8 | public: 9 | void activeComponentIdChanged() override; 10 | StatusCode onAddedClean(CoreContext* context) override; 11 | bool collapse(bool value) override; 12 | 13 | private: 14 | void propagateCollapse(bool collapse); 15 | }; 16 | } // namespace rive 17 | 18 | #endif -------------------------------------------------------------------------------- /src/generated/animation/transition_property_artboard_comparator_base.cpp: -------------------------------------------------------------------------------- 1 | #include "rive/generated/animation/transition_property_artboard_comparator_base.hpp" 2 | #include "rive/animation/transition_property_artboard_comparator.hpp" 3 | 4 | using namespace rive; 5 | 6 | Core* TransitionPropertyArtboardComparatorBase::clone() const 7 | { 8 | auto cloned = new TransitionPropertyArtboardComparator(); 9 | cloned->copy(*this); 10 | return cloned; 11 | } 12 | -------------------------------------------------------------------------------- /include/rive/animation/transition_input_condition.hpp: -------------------------------------------------------------------------------- 1 | #ifndef _RIVE_TRANSITION_INPUT_CONDITION_HPP_ 2 | #define _RIVE_TRANSITION_INPUT_CONDITION_HPP_ 3 | #include "rive/generated/animation/transition_input_condition_base.hpp" 4 | #include 5 | namespace rive 6 | { 7 | class TransitionInputCondition : public TransitionInputConditionBase 8 | { 9 | public: 10 | StatusCode import(ImportStack& importStack) override; 11 | }; 12 | } // namespace rive 13 | 14 | #endif -------------------------------------------------------------------------------- /src/animation/cubic_ease_interpolator.cpp: -------------------------------------------------------------------------------- 1 | #include "rive/animation/cubic_ease_interpolator.hpp" 2 | 3 | using namespace rive; 4 | 5 | float CubicEaseInterpolator::transformValue(float valueFrom, float valueTo, float factor) 6 | { 7 | return valueFrom + (valueTo - valueFrom) * transform(factor); 8 | } 9 | 10 | float CubicEaseInterpolator::transform(float factor) const 11 | { 12 | return CubicInterpolatorSolver::calcBezier(m_solver.getT(factor), y1(), y2()); 13 | } -------------------------------------------------------------------------------- /src/generated/animation/transition_property_viewmodel_comparator_base.cpp: -------------------------------------------------------------------------------- 1 | #include "rive/generated/animation/transition_property_viewmodel_comparator_base.hpp" 2 | #include "rive/animation/transition_property_viewmodel_comparator.hpp" 3 | 4 | using namespace rive; 5 | 6 | Core* TransitionPropertyViewModelComparatorBase::clone() const 7 | { 8 | auto cloned = new TransitionPropertyViewModelComparator(); 9 | cloned->copy(*this); 10 | return cloned; 11 | } 12 | -------------------------------------------------------------------------------- /dev/analyze.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # install scan-build 4 | if ! command -v scan-build &> /dev/null 5 | then 6 | if ! command -v pip &> /dev/null 7 | then 8 | curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py 9 | python3 get-pip.py 10 | fi 11 | pip install scan-build 12 | fi 13 | 14 | 15 | cd test 16 | premake5 clean || exit 1 17 | premake5 gmake || exit 1 18 | scan-build -o ../analysis_report/ make -j7 || exit 1 19 | premake5 clean 20 | -------------------------------------------------------------------------------- /dev/defs/animation/nested_number.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "NestedNumber", 3 | "key": { 4 | "int": 124, 5 | "string": "nestedNumber" 6 | }, 7 | "extends": "animation/nested_input.json", 8 | "properties": { 9 | "nestedValue": { 10 | "type": "double", 11 | "initialValue": "0", 12 | "animates": true, 13 | "pureVirtual": true, 14 | "key": { 15 | "int": 239, 16 | "string": "nestedValue" 17 | } 18 | } 19 | } 20 | } -------------------------------------------------------------------------------- /include/rive/animation/nested_bool.hpp: -------------------------------------------------------------------------------- 1 | #ifndef _RIVE_NESTED_BOOL_HPP_ 2 | #define _RIVE_NESTED_BOOL_HPP_ 3 | #include "rive/generated/animation/nested_bool_base.hpp" 4 | #include 5 | namespace rive 6 | { 7 | class NestedBool : public NestedBoolBase 8 | { 9 | public: 10 | void nestedValue(bool value) override; 11 | bool nestedValue() const override; 12 | 13 | void applyValue() override; 14 | 15 | protected: 16 | }; 17 | } // namespace rive 18 | 19 | #endif -------------------------------------------------------------------------------- /include/rive/text/text_style_axis.hpp: -------------------------------------------------------------------------------- 1 | #ifndef _RIVE_TEXT_STYLE_AXIS_HPP_ 2 | #define _RIVE_TEXT_STYLE_AXIS_HPP_ 3 | #include "rive/generated/text/text_style_axis_base.hpp" 4 | #include 5 | namespace rive 6 | { 7 | class TextStyleAxis : public TextStyleAxisBase 8 | { 9 | public: 10 | StatusCode onAddedDirty(CoreContext* context) override; 11 | void tagChanged() override; 12 | void axisValueChanged() override; 13 | }; 14 | } // namespace rive 15 | 16 | #endif -------------------------------------------------------------------------------- /dev/defs/animation/transition_value_number_comparator.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "TransitionValueNumberComparator", 3 | "key": { 4 | "int": 484, 5 | "string": "transitionvaluenumbercomparator" 6 | }, 7 | "extends": "animation/transition_value_comparator.json", 8 | "properties": { 9 | "value": { 10 | "type": "double", 11 | "initialValue": "0", 12 | "key": { 13 | "int": 652, 14 | "string": "value" 15 | } 16 | } 17 | } 18 | } -------------------------------------------------------------------------------- /dev/defs/animation/transition_value_string_comparator.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "TransitionValueStringComparator", 3 | "key": { 4 | "int": 486, 5 | "string": "transitionvaluestringcomparator" 6 | }, 7 | "extends": "animation/transition_value_comparator.json", 8 | "properties": { 9 | "value": { 10 | "type": "String", 11 | "initialValue": "''", 12 | "key": { 13 | "int": 654, 14 | "string": "value" 15 | } 16 | } 17 | } 18 | } -------------------------------------------------------------------------------- /dev/defs/viewmodel/viewmodel_component.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "ViewModelComponent", 3 | "key": { 4 | "int": 429, 5 | "string": "viewmodelcomponent" 6 | }, 7 | "properties": { 8 | "name": { 9 | "type": "String", 10 | "initialValue": "''", 11 | "key": { 12 | "int": 557, 13 | "string": "name" 14 | }, 15 | "description": "Non-unique identifier, used to give friendly names to any view model component." 16 | } 17 | } 18 | } -------------------------------------------------------------------------------- /dev/defs/world_transform_component.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "WorldTransformComponent", 3 | "key": { 4 | "int": 91, 5 | "string": "worldtransformcomponent" 6 | }, 7 | "abstract": true, 8 | "extends": "container_component.json", 9 | "properties": { 10 | "opacity": { 11 | "type": "double", 12 | "initialValue": "1", 13 | "animates": true, 14 | "key": { 15 | "int": 18, 16 | "string": "opacity" 17 | } 18 | } 19 | } 20 | } -------------------------------------------------------------------------------- /include/rive/shapes/ellipse.hpp: -------------------------------------------------------------------------------- 1 | #ifndef _RIVE_ELLIPSE_HPP_ 2 | #define _RIVE_ELLIPSE_HPP_ 3 | #include "rive/generated/shapes/ellipse_base.hpp" 4 | #include "rive/shapes/cubic_detached_vertex.hpp" 5 | 6 | namespace rive 7 | { 8 | class Ellipse : public EllipseBase 9 | { 10 | CubicDetachedVertex m_Vertex1, m_Vertex2, m_Vertex3, m_Vertex4; 11 | 12 | public: 13 | Ellipse(); 14 | void update(ComponentDirt value) override; 15 | }; 16 | } // namespace rive 17 | 18 | #endif -------------------------------------------------------------------------------- /include/rive/shapes/path_vertex.hpp: -------------------------------------------------------------------------------- 1 | #ifndef _RIVE_PATH_VERTEX_HPP_ 2 | #define _RIVE_PATH_VERTEX_HPP_ 3 | #include "rive/bones/weight.hpp" 4 | #include "rive/generated/shapes/path_vertex_base.hpp" 5 | #include "rive/math/mat2d.hpp" 6 | namespace rive 7 | { 8 | class PathVertex : public PathVertexBase 9 | { 10 | 11 | public: 12 | StatusCode onAddedDirty(CoreContext* context) override; 13 | void markGeometryDirty() override; 14 | }; 15 | } // namespace rive 16 | 17 | #endif -------------------------------------------------------------------------------- /src/text/font_hb_apple.mm: -------------------------------------------------------------------------------- 1 | #include "rive/text_engine.hpp" 2 | 3 | #ifdef WITH_RIVE_TEXT 4 | #include "rive/text/font_hb.hpp" 5 | #import 6 | 7 | #include "hb-coretext.h" 8 | 9 | rive::rcp HBFont::FromSystem(void* systemFont) 10 | { 11 | auto font = hb_coretext_font_create((CTFontRef)systemFont); 12 | if (font) 13 | { 14 | return rive::rcp(new HBFont(font)); 15 | } 16 | return nullptr; 17 | } 18 | #endif 19 | -------------------------------------------------------------------------------- /dev/defs/animation/transition_value_boolean_comparator.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "TransitionValueBooleanComparator", 3 | "key": { 4 | "int": 481, 5 | "string": "transitionvaluebooleancomparator" 6 | }, 7 | "extends": "animation/transition_value_comparator.json", 8 | "properties": { 9 | "value": { 10 | "type": "bool", 11 | "initialValue": "false", 12 | "key": { 13 | "int": 647, 14 | "string": "value" 15 | } 16 | } 17 | } 18 | } -------------------------------------------------------------------------------- /dev/defs/animation/transition_value_color_comparator.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "TransitionValueColorComparator", 3 | "key": { 4 | "int": 483, 5 | "string": "transitionvaluecolorcomparator" 6 | }, 7 | "extends": "animation/transition_value_comparator.json", 8 | "properties": { 9 | "value": { 10 | "type": "Color", 11 | "initialValue": "0xFF1D1D1D", 12 | "key": { 13 | "int": 651, 14 | "string": "value" 15 | } 16 | } 17 | } 18 | } -------------------------------------------------------------------------------- /include/rive/animation/nested_number.hpp: -------------------------------------------------------------------------------- 1 | #ifndef _RIVE_NESTED_NUMBER_HPP_ 2 | #define _RIVE_NESTED_NUMBER_HPP_ 3 | #include "rive/generated/animation/nested_number_base.hpp" 4 | #include 5 | namespace rive 6 | { 7 | class NestedNumber : public NestedNumberBase 8 | { 9 | public: 10 | void nestedValue(float value) override; 11 | float nestedValue() const override; 12 | void applyValue() override; 13 | 14 | protected: 15 | }; 16 | } // namespace rive 17 | 18 | #endif -------------------------------------------------------------------------------- /include/rive/shapes/paint/gradient_stop.hpp: -------------------------------------------------------------------------------- 1 | #ifndef _RIVE_GRADIENT_STOP_HPP_ 2 | #define _RIVE_GRADIENT_STOP_HPP_ 3 | #include "rive/generated/shapes/paint/gradient_stop_base.hpp" 4 | namespace rive 5 | { 6 | class GradientStop : public GradientStopBase 7 | { 8 | public: 9 | StatusCode onAddedDirty(CoreContext* context) override; 10 | 11 | protected: 12 | void colorValueChanged() override; 13 | void positionChanged() override; 14 | }; 15 | } // namespace rive 16 | 17 | #endif -------------------------------------------------------------------------------- /include/rive/shapes/triangle.hpp: -------------------------------------------------------------------------------- 1 | #ifndef _RIVE_TRIANGLE_HPP_ 2 | #define _RIVE_TRIANGLE_HPP_ 3 | #include "rive/generated/shapes/triangle_base.hpp" 4 | #include "rive/shapes/straight_vertex.hpp" 5 | 6 | namespace rive 7 | { 8 | class Triangle : public TriangleBase 9 | { 10 | private: 11 | StraightVertex m_Vertex1, m_Vertex2, m_Vertex3; 12 | 13 | public: 14 | Triangle(); 15 | void update(ComponentDirt value) override; 16 | }; 17 | } // namespace rive 18 | 19 | #endif 20 | -------------------------------------------------------------------------------- /src/data_bind/context/context_value_list_item.cpp: -------------------------------------------------------------------------------- 1 | #include "rive/data_bind/context/context_value_list_item.hpp" 2 | 3 | using namespace rive; 4 | 5 | DataBindContextValueListItem::DataBindContextValueListItem( 6 | std::unique_ptr artboard, 7 | std::unique_ptr stateMachine, 8 | ViewModelInstanceListItem* listItem) : 9 | m_Artboard(std::move(artboard)), 10 | m_StateMachine(std::move(stateMachine)), 11 | m_ListItem(listItem){}; -------------------------------------------------------------------------------- /dev/defs/animation/keyframe_id.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "KeyFrameId", 3 | "key": { 4 | "int": 50, 5 | "string": "keyframeid" 6 | }, 7 | "extends": "animation/interpolating_keyframe.json", 8 | "properties": { 9 | "value": { 10 | "type": "Id", 11 | "typeRuntime": "uint", 12 | "initialValue": "Core.missingId", 13 | "initialValueRuntime": "-1", 14 | "key": { 15 | "int": 122, 16 | "string": "value" 17 | } 18 | } 19 | } 20 | } -------------------------------------------------------------------------------- /include/rive/animation/blend_animation_1d.hpp: -------------------------------------------------------------------------------- 1 | #ifndef _RIVE_BLEND_ANIMATION1_D_HPP_ 2 | #define _RIVE_BLEND_ANIMATION1_D_HPP_ 3 | #include "rive/generated/animation/blend_animation_1d_base.hpp" 4 | #include 5 | namespace rive 6 | { 7 | class BlendAnimation1D : public BlendAnimation1DBase 8 | { 9 | public: 10 | StatusCode onAddedDirty(CoreContext* context) override; 11 | StatusCode onAddedClean(CoreContext* context) override; 12 | }; 13 | } // namespace rive 14 | 15 | #endif -------------------------------------------------------------------------------- /include/rive/shapes/paint/stroke_effect.hpp: -------------------------------------------------------------------------------- 1 | #ifndef _RIVE_STROKE_EFFECT_HPP_ 2 | #define _RIVE_STROKE_EFFECT_HPP_ 3 | 4 | #include "rive/rive_types.hpp" 5 | 6 | namespace rive 7 | { 8 | class Factory; 9 | class RenderPath; 10 | class RawPath; 11 | 12 | class StrokeEffect 13 | { 14 | public: 15 | virtual ~StrokeEffect() {} 16 | virtual RenderPath* effectPath(const RawPath& source, Factory*) = 0; 17 | virtual void invalidateEffect() = 0; 18 | }; 19 | } // namespace rive 20 | #endif -------------------------------------------------------------------------------- /include/rive/shapes/star.hpp: -------------------------------------------------------------------------------- 1 | #ifndef _RIVE_STAR_HPP_ 2 | #define _RIVE_STAR_HPP_ 3 | #include "rive/generated/shapes/star_base.hpp" 4 | #include 5 | namespace rive 6 | { 7 | class Star : public StarBase 8 | { 9 | public: 10 | Star(); 11 | void update(ComponentDirt value) override; 12 | 13 | protected: 14 | void innerRadiusChanged() override; 15 | std::size_t vertexCount() override; 16 | void buildPolygon() override; 17 | }; 18 | } // namespace rive 19 | 20 | #endif -------------------------------------------------------------------------------- /include/rive/animation/keyed_callback_reporter.hpp: -------------------------------------------------------------------------------- 1 | #ifndef _RIVE_KEYED_CALLBACK_REPORTER_HPP_ 2 | #define _RIVE_KEYED_CALLBACK_REPORTER_HPP_ 3 | 4 | namespace rive 5 | { 6 | class KeyedCallbackReporter 7 | { 8 | public: 9 | virtual ~KeyedCallbackReporter() {} 10 | virtual void reportKeyedCallback(uint32_t objectId, 11 | uint32_t propertyKey, 12 | float elapsedSeconds) = 0; 13 | }; 14 | } // namespace rive 15 | 16 | #endif -------------------------------------------------------------------------------- /include/rive/animation/keyframe.hpp: -------------------------------------------------------------------------------- 1 | #ifndef _RIVE_KEY_FRAME_HPP_ 2 | #define _RIVE_KEY_FRAME_HPP_ 3 | #include "rive/generated/animation/keyframe_base.hpp" 4 | namespace rive 5 | { 6 | class KeyFrame : public KeyFrameBase 7 | { 8 | public: 9 | inline float seconds() const { return m_seconds; } 10 | 11 | void computeSeconds(int fps); 12 | 13 | StatusCode import(ImportStack& importStack) override; 14 | 15 | private: 16 | float m_seconds; 17 | }; 18 | } // namespace rive 19 | 20 | #endif -------------------------------------------------------------------------------- /dev/defs/shapes/star.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Star", 3 | "key": { 4 | "int": 52, 5 | "string": "star" 6 | }, 7 | "extends": "shapes/polygon.json", 8 | "properties": { 9 | "innerRadius": { 10 | "type": "double", 11 | "initialValue": "0.5", 12 | "animates": true, 13 | "key": { 14 | "int": 127, 15 | "string": "inner_radius" 16 | }, 17 | "description": "Percentage of width/height to project inner points of the star." 18 | } 19 | } 20 | } -------------------------------------------------------------------------------- /include/rive/shapes/cubic_mirrored_vertex.hpp: -------------------------------------------------------------------------------- 1 | #ifndef _RIVE_CUBIC_MIRRORED_VERTEX_HPP_ 2 | #define _RIVE_CUBIC_MIRRORED_VERTEX_HPP_ 3 | #include "rive/generated/shapes/cubic_mirrored_vertex_base.hpp" 4 | namespace rive 5 | { 6 | class CubicMirroredVertex : public CubicMirroredVertexBase 7 | { 8 | protected: 9 | void computeIn() override; 10 | void computeOut() override; 11 | void rotationChanged() override; 12 | void distanceChanged() override; 13 | }; 14 | } // namespace rive 15 | 16 | #endif -------------------------------------------------------------------------------- /dev/defs/data_bind/bindable_property.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "BindableProperty", 3 | "key": { 4 | "int": 9, 5 | "string": "bindableproperty" 6 | }, 7 | "abstract": true, 8 | "properties": { 9 | "dataBindId": { 10 | "type": "Id", 11 | "initialValue": "Core.missingId", 12 | "key": { 13 | "int": 633, 14 | "string": "databindid" 15 | }, 16 | "description": "Id of the data bind binded to this property", 17 | "runtime": false 18 | } 19 | } 20 | } -------------------------------------------------------------------------------- /include/rive/shapes/paint/stroke_cap.hpp: -------------------------------------------------------------------------------- 1 | #ifndef _RIVE_STROKE_CAP_HPP_ 2 | #define _RIVE_STROKE_CAP_HPP_ 3 | namespace rive 4 | { 5 | /// Style used for stroke line endings. 6 | enum class StrokeCap : unsigned int 7 | { 8 | /// Flat edge at the start/end of the stroke. 9 | butt = 0, 10 | 11 | /// Circular edge at the start/end of the stroke. 12 | round = 1, 13 | 14 | /// Flat protruding edge at the start/end of the stroke. 15 | square = 2 16 | }; 17 | } // namespace rive 18 | #endif 19 | -------------------------------------------------------------------------------- /dependencies/macosx/get_imgui.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | set -e 4 | 5 | if [[ -z "${DEPENDENCIES}" ]]; then 6 | echo "DEPENDENCIES env variable must be set. This script is usually called by other scripts." 7 | exit 1 8 | fi 9 | pushd $DEPENDENCIES 10 | IMGUI_REPO=https://github.com/ocornut/imgui 11 | IMGUI_STABLE_BRANCH=master 12 | 13 | if [ ! -d imgui ]; then 14 | echo "Cloning ImGui." 15 | git clone $IMGUI_REPO 16 | fi 17 | 18 | cd imgui && git checkout $IMGUI_STABLE_BRANCH && git fetch && git pull 19 | -------------------------------------------------------------------------------- /dev/defs/animation/listener_bool_change.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "ListenerBoolChange", 3 | "key": { 4 | "int": 117, 5 | "string": "listener_bool_change" 6 | }, 7 | "extends": "animation/listener_input_change.json", 8 | "properties": { 9 | "value": { 10 | "type": "uint", 11 | "initialValue": "1", 12 | "key": { 13 | "int": 228, 14 | "string": "value" 15 | }, 16 | "description": "Value to set the input to when the listener occurs." 17 | } 18 | } 19 | } -------------------------------------------------------------------------------- /include/rive/animation/listener_fire_event.hpp: -------------------------------------------------------------------------------- 1 | #ifndef _RIVE_LISTENER_FIRE_EVENT_HPP_ 2 | #define _RIVE_LISTENER_FIRE_EVENT_HPP_ 3 | #include "rive/generated/animation/listener_fire_event_base.hpp" 4 | 5 | namespace rive 6 | { 7 | class ListenerFireEvent : public ListenerFireEventBase 8 | { 9 | public: 10 | void perform(StateMachineInstance* stateMachineInstance, 11 | Vec2D position, 12 | Vec2D previousPosition) const override; 13 | }; 14 | } // namespace rive 15 | 16 | #endif -------------------------------------------------------------------------------- /src/animation/system_state_instance.cpp: -------------------------------------------------------------------------------- 1 | #include "rive/animation/system_state_instance.hpp" 2 | using namespace rive; 3 | 4 | SystemStateInstance::SystemStateInstance(const LayerState* layerState, ArtboardInstance* instance) : 5 | StateInstance(layerState) 6 | {} 7 | 8 | void SystemStateInstance::advance(float seconds, StateMachineInstance* stateMachineInstance) {} 9 | void SystemStateInstance::apply(ArtboardInstance* artboard, float mix) {} 10 | 11 | bool SystemStateInstance::keepGoing() const { return false; } -------------------------------------------------------------------------------- /dev/defs/animation/listener_number_change.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "ListenerNumberChange", 3 | "key": { 4 | "int": 118, 5 | "string": "listener_number_change" 6 | }, 7 | "extends": "animation/listener_input_change.json", 8 | "properties": { 9 | "value": { 10 | "type": "double", 11 | "initialValue": "0", 12 | "key": { 13 | "int": 229, 14 | "string": "value" 15 | }, 16 | "description": "Value to set the input to when the listener occurs." 17 | } 18 | } 19 | } -------------------------------------------------------------------------------- /dev/defs/shapes/straight_vertex.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "StraightVertex", 3 | "key": { 4 | "int": 5, 5 | "string": "straightvertex" 6 | }, 7 | "extends": "shapes/path_vertex.json", 8 | "generic": "bones/weight.json", 9 | "properties": { 10 | "radius": { 11 | "type": "double", 12 | "initialValue": "0", 13 | "animates": true, 14 | "key": { 15 | "int": 26, 16 | "string": "radius" 17 | }, 18 | "description": "Radius of the vertex" 19 | } 20 | } 21 | } -------------------------------------------------------------------------------- /include/rive/constraints/distance_constraint.hpp: -------------------------------------------------------------------------------- 1 | #ifndef _RIVE_DISTANCE_CONSTRAINT_HPP_ 2 | #define _RIVE_DISTANCE_CONSTRAINT_HPP_ 3 | #include "rive/generated/constraints/distance_constraint_base.hpp" 4 | #include 5 | namespace rive 6 | { 7 | class DistanceConstraint : public DistanceConstraintBase 8 | { 9 | public: 10 | void constrain(TransformComponent* component) override; 11 | void distanceChanged() override; 12 | void modeValueChanged() override; 13 | }; 14 | } // namespace rive 15 | 16 | #endif -------------------------------------------------------------------------------- /src/importers/keyed_object_importer.cpp: -------------------------------------------------------------------------------- 1 | #include "rive/importers/keyed_object_importer.hpp" 2 | #include "rive/animation/keyed_object.hpp" 3 | #include "rive/animation/keyed_property.hpp" 4 | #include "rive/artboard.hpp" 5 | 6 | using namespace rive; 7 | 8 | KeyedObjectImporter::KeyedObjectImporter(KeyedObject* keyedObject) : m_KeyedObject(keyedObject) {} 9 | 10 | void KeyedObjectImporter::addKeyedProperty(std::unique_ptr property) 11 | { 12 | m_KeyedObject->addKeyedProperty(std::move(property)); 13 | } -------------------------------------------------------------------------------- /include/rive/bones/cubic_weight.hpp: -------------------------------------------------------------------------------- 1 | #ifndef _RIVE_CUBIC_WEIGHT_HPP_ 2 | #define _RIVE_CUBIC_WEIGHT_HPP_ 3 | #include "rive/generated/bones/cubic_weight_base.hpp" 4 | #include 5 | namespace rive 6 | { 7 | class CubicWeight : public CubicWeightBase 8 | { 9 | private: 10 | Vec2D m_InTranslation; 11 | Vec2D m_OutTranslation; 12 | 13 | public: 14 | Vec2D& inTranslation() { return m_InTranslation; } 15 | Vec2D& outTranslation() { return m_OutTranslation; } 16 | }; 17 | } // namespace rive 18 | 19 | #endif -------------------------------------------------------------------------------- /include/rive/event_report.hpp: -------------------------------------------------------------------------------- 1 | #ifndef _RIVE_EVENT_REPORT_HPP_ 2 | #define _RIVE_EVENT_REPORT_HPP_ 3 | 4 | namespace rive 5 | { 6 | class Event; 7 | 8 | class EventReport 9 | { 10 | public: 11 | EventReport(Event* event, float secondsDelay) : m_event(event), m_secondsDelay(secondsDelay) {} 12 | Event* event() const { return m_event; } 13 | float secondsDelay() const { return m_secondsDelay; } 14 | 15 | private: 16 | Event* m_event; 17 | float m_secondsDelay; 18 | }; 19 | } // namespace rive 20 | 21 | #endif -------------------------------------------------------------------------------- /dev/core_generator/lib/src/field_types/uint_field_type.dart: -------------------------------------------------------------------------------- 1 | import '../field_type.dart'; 2 | 3 | class UintFieldType extends FieldType { 4 | UintFieldType() 5 | : super( 6 | 'uint', 7 | 'CoreUintType', 8 | cppName: 'uint32_t', 9 | ); 10 | 11 | @override 12 | String get defaultValue => '0'; 13 | 14 | // We do this to fix up CoreContext.invalidProperyKey 15 | @override 16 | String? convertCpp(String value) => 17 | value.replaceAll('CoreContext.', 'Core::'); 18 | } 19 | --------------------------------------------------------------------------------