From d9e3d4bb87440c49fc585f72c842d588627eea9a Mon Sep 17 00:00:00 2001 From: Tanasart <22589759+Ttanasart-pt@users.noreply.github.com> Date: Sun, 19 Feb 2023 19:49:20 +0700 Subject: [PATCH] 1.13pr11 --- PixelComposer.yyp | 34 ++- objects/o_dialog_scrollbox/Create_0.gml | 11 +- objects/o_main/Step_1.gml | 5 +- scripts/__shapes/__shapes.gml | 253 ++++++++++++++++++ scripts/__shapes/__shapes.yy | 11 + .../draw_circle_angle/draw_circle_angle.gml | 23 ++ .../draw_circle_angle/draw_circle_angle.yy | 11 + scripts/draw_line_width2/draw_line_width2.gml | 20 +- .../draw_surface_blend/draw_surface_blend.gml | 3 +- scripts/lerp_float/lerp_float.gml | 4 + scripts/node_blend/node_blend.gml | 2 +- scripts/node_cache_array/node_cache_array.gml | 21 ++ scripts/node_cache_array/node_cache_array.yy | 11 + scripts/node_cache_array/node_outline.yy | 12 + scripts/node_collection/node_collection.gml | 9 +- scripts/node_data/node_data.gml | 74 +++-- scripts/node_export/node_export.gml | 2 + scripts/node_feedback/node_feedback.gml | 2 + .../node_feedback_input.gml | 2 +- .../node_feedback_output.gml | 2 +- scripts/node_functions/node_functions.gml | 130 +++++++++ scripts/node_grid/node_grid.gml | 2 +- scripts/node_group_input/node_group_input.gml | 4 +- .../node_group_output/node_group_output.gml | 3 +- scripts/node_iterate/node_iterate.gml | 3 + .../node_iterate_each/node_iterate_each.gml | 12 +- .../node_iterator_each_input.gml | 2 +- .../node_iterator_each_output.gml | 14 +- .../node_iterator_each_size.gml | 22 ++ .../node_iterator_each_size.yy | 11 + .../node_iterator_input.gml | 2 +- .../node_iterator_length.gml | 22 ++ .../node_iterator_length.yy | 11 + .../node_iterator_output.gml | 4 +- scripts/node_keyframe/node_keyframe.gml | 2 +- scripts/node_line/node_line.gml | 104 ++++--- scripts/node_lua_compute/node_lua_compute.gml | 4 +- scripts/node_lua_surface/node_lua_surface.gml | 1 + scripts/node_noise_grid/node_noise_grid.gml | 2 +- scripts/node_particle/node_particle.gml | 15 +- scripts/node_path/node_path.gml | 25 +- scripts/node_polygonal_shape/node_gradient.yy | 12 + scripts/node_polygonal_shape/node_perlin.yy | 12 + .../node_polygonal_shape.gml | 162 +++++++++++ .../node_polygonal_shape.yy | 11 + scripts/node_registry/node_registry.gml | 20 +- scripts/node_stack/node_stack.gml | 2 +- scripts/node_trail/node_trail.gml | 70 +++-- scripts/panel_collection/panel_collection.gml | 7 +- scripts/panel_graph/panel_graph.gml | 17 ++ scripts/render_data/render_data.gml | 4 +- scripts/scrollBox/scrollBox.gml | 2 + .../surface_functions/surface_functions.gml | 5 +- shaders/sh_blend_replace/sh_blend_add.yy | 11 + .../sh_blend_add_alpha_adj.yy | 11 + shaders/sh_blend_replace/sh_blend_max.yy | 11 + shaders/sh_blend_replace/sh_blend_multiply.yy | 11 + shaders/sh_blend_replace/sh_blend_normal.yy | 11 + shaders/sh_blend_replace/sh_blend_replace.fsh | 34 +++ shaders/sh_blend_replace/sh_blend_replace.vsh | 19 ++ shaders/sh_blend_replace/sh_blend_replace.yy | 10 + shaders/sh_grid_noise/sh_grid_noise.fsh | 13 +- .../32d30ea4-f058-42d5-be58-facfee2d02e8.png | Bin 0 -> 966 bytes .../0ab9f754-9684-4551-ba84-8e94f04c058b.png | Bin 0 -> 966 bytes .../s_node_cache_array/s_node_cache_array.yy | 74 +++++ .../s_node_grid_noise/s_node_grid_noise.yy | 2 +- .../a41c1b6a-de41-46f4-b85c-b8ce499ddfb4.png | Bin 0 -> 1224 bytes .../0029c8ae-6fba-4656-8fed-55f184dcf049.png | Bin 0 -> 1224 bytes .../s_node_iterator_amount.yy | 74 +++++ .../bf3c1c69-a52c-42b9-a02e-0196b33d9955.png | Bin 0 -> 558 bytes .../13d238aa-df20-4732-a719-28010df9fe42.png | Bin 0 -> 558 bytes .../s_node_iterator_length.yy | 74 +++++ 72 files changed, 1401 insertions(+), 185 deletions(-) create mode 100644 scripts/__shapes/__shapes.gml create mode 100644 scripts/__shapes/__shapes.yy create mode 100644 scripts/draw_circle_angle/draw_circle_angle.gml create mode 100644 scripts/draw_circle_angle/draw_circle_angle.yy create mode 100644 scripts/node_cache_array/node_cache_array.gml create mode 100644 scripts/node_cache_array/node_cache_array.yy create mode 100644 scripts/node_cache_array/node_outline.yy create mode 100644 scripts/node_iterator_each_size/node_iterator_each_size.gml create mode 100644 scripts/node_iterator_each_size/node_iterator_each_size.yy create mode 100644 scripts/node_iterator_length/node_iterator_length.gml create mode 100644 scripts/node_iterator_length/node_iterator_length.yy create mode 100644 scripts/node_polygonal_shape/node_gradient.yy create mode 100644 scripts/node_polygonal_shape/node_perlin.yy create mode 100644 scripts/node_polygonal_shape/node_polygonal_shape.gml create mode 100644 scripts/node_polygonal_shape/node_polygonal_shape.yy create mode 100644 shaders/sh_blend_replace/sh_blend_add.yy create mode 100644 shaders/sh_blend_replace/sh_blend_add_alpha_adj.yy create mode 100644 shaders/sh_blend_replace/sh_blend_max.yy create mode 100644 shaders/sh_blend_replace/sh_blend_multiply.yy create mode 100644 shaders/sh_blend_replace/sh_blend_normal.yy create mode 100644 shaders/sh_blend_replace/sh_blend_replace.fsh create mode 100644 shaders/sh_blend_replace/sh_blend_replace.vsh create mode 100644 shaders/sh_blend_replace/sh_blend_replace.yy create mode 100644 sprites/s_node_cache_array/32d30ea4-f058-42d5-be58-facfee2d02e8.png create mode 100644 sprites/s_node_cache_array/layers/32d30ea4-f058-42d5-be58-facfee2d02e8/0ab9f754-9684-4551-ba84-8e94f04c058b.png create mode 100644 sprites/s_node_cache_array/s_node_cache_array.yy create mode 100644 sprites/s_node_iterator_amount/a41c1b6a-de41-46f4-b85c-b8ce499ddfb4.png create mode 100644 sprites/s_node_iterator_amount/layers/a41c1b6a-de41-46f4-b85c-b8ce499ddfb4/0029c8ae-6fba-4656-8fed-55f184dcf049.png create mode 100644 sprites/s_node_iterator_amount/s_node_iterator_amount.yy create mode 100644 sprites/s_node_iterator_length/bf3c1c69-a52c-42b9-a02e-0196b33d9955.png create mode 100644 sprites/s_node_iterator_length/layers/bf3c1c69-a52c-42b9-a02e-0196b33d9955/13d238aa-df20-4732-a719-28010df9fe42.png create mode 100644 sprites/s_node_iterator_length/s_node_iterator_length.yy diff --git a/PixelComposer.yyp b/PixelComposer.yyp index e9370dbc1..45e3a186d 100644 --- a/PixelComposer.yyp +++ b/PixelComposer.yyp @@ -51,7 +51,7 @@ {"id":{"name":"sh_perlin_smear","path":"shaders/sh_perlin_smear/sh_perlin_smear.yy",},"order":7,}, {"id":{"name":"node_array_remove","path":"scripts/node_array_remove/node_array_remove.yy",},"order":0,}, {"id":{"name":"node_path_blend","path":"scripts/node_path_blend/node_path_blend.yy",},"order":0,}, - {"id":{"name":"node_switch","path":"scripts/node_switch/node_switch.yy",},"order":8,}, + {"id":{"name":"node_switch","path":"scripts/node_switch/node_switch.yy",},"order":5,}, {"id":{"name":"sh_corner","path":"shaders/sh_corner/sh_corner.yy",},"order":20,}, {"id":{"name":"node_array","path":"scripts/node_array/node_array.yy",},"order":8,}, {"id":{"name":"sh_colorize","path":"shaders/sh_colorize/sh_colorize.yy",},"order":9,}, @@ -111,6 +111,7 @@ {"id":{"name":"math_function","path":"scripts/math_function/math_function.yy",},"order":7,}, {"id":{"name":"scrollBox","path":"scripts/scrollBox/scrollBox.yy",},"order":13,}, {"id":{"name":"o_dialog_exit","path":"objects/o_dialog_exit/o_dialog_exit.yy",},"order":2,}, + {"id":{"name":"node_polygonal_shape","path":"scripts/node_polygonal_shape/node_polygonal_shape.yy",},"order":27,}, {"id":{"name":"fd_rectangle_get_collision_mask_sprite","path":"scripts/fd_rectangle_get_collision_mask_sprite/fd_rectangle_get_collision_mask_sprite.yy",},"order":4,}, {"id":{"name":"node_flip","path":"scripts/node_flip/node_flip.yy",},"order":13,}, {"id":{"name":"shader_set_functions","path":"scripts/shader_set_functions/shader_set_functions.yy",},"order":0,}, @@ -167,6 +168,7 @@ {"id":{"name":"s_node_boolean","path":"sprites/s_node_boolean/s_node_boolean.yy",},"order":0,}, {"id":{"name":"s_workshop_badge","path":"sprites/s_workshop_badge/s_workshop_badge.yy",},"order":1,}, {"id":{"name":"node_compare","path":"scripts/node_compare/node_compare.yy",},"order":16,}, + {"id":{"name":"node_iterator_each_size","path":"scripts/node_iterator_each_size/node_iterator_each_size.yy",},"order":3,}, {"id":{"name":"fd_draw_self_to_collision_mask_surface","path":"scripts/fd_draw_self_to_collision_mask_surface/fd_draw_self_to_collision_mask_surface.yy",},"order":0,}, {"id":{"name":"s_node_HSV_combine","path":"sprites/s_node_HSV_combine/s_node_HSV_combine.yy",},"order":42,}, {"id":{"name":"node_normal_light","path":"scripts/node_normal_light/node_normal_light.yy",},"order":0,}, @@ -217,6 +219,7 @@ {"id":{"name":"node_color_from_rgb","path":"scripts/node_color_from_rgb/node_color_from_rgb.yy",},"order":7,}, {"id":{"name":"node_transform","path":"scripts/node_transform/node_transform.yy",},"order":0,}, {"id":{"name":"curveBox","path":"scripts/curveBox/curveBox.yy",},"order":8,}, + {"id":{"name":"s_node_iterator_length","path":"sprites/s_node_iterator_length/s_node_iterator_length.yy",},"order":24,}, {"id":{"name":"preview_overlay_vector","path":"scripts/preview_overlay_vector/preview_overlay_vector.yy",},"order":2,}, {"id":{"name":"sh_gradient_display","path":"shaders/sh_gradient_display/sh_gradient_display.yy",},"order":18,}, {"id":{"name":"node_json_file_write","path":"scripts/node_json_file_write/node_json_file_write.yy",},"order":12,}, @@ -366,6 +369,7 @@ {"id":{"name":"o_dialog_drag_folder","path":"objects/o_dialog_drag_folder/o_dialog_drag_folder.yy",},"order":2,}, {"id":{"name":"node_VFX_effect_repel","path":"scripts/node_VFX_effect_repel/node_VFX_effect_repel.yy",},"order":9,}, {"id":{"name":"s_node_alpha_cut","path":"sprites/s_node_alpha_cut/s_node_alpha_cut.yy",},"order":1,}, + {"id":{"name":"node_iterator_length","path":"scripts/node_iterator_length/node_iterator_length.yy",},"order":3,}, {"id":{"name":"node_VFX_effect_attract","path":"scripts/node_VFX_effect_attract/node_VFX_effect_attract.yy",},"order":8,}, {"id":{"name":"node_fluid_repulse","path":"scripts/node_fluid_repulse/node_fluid_repulse.yy",},"order":0,}, {"id":{"name":"s_node_text_splice","path":"sprites/s_node_text_splice/s_node_text_splice.yy",},"order":6,}, @@ -425,6 +429,7 @@ {"id":{"name":"o_dialog_add_multiple_images","path":"objects/o_dialog_add_multiple_images/o_dialog_add_multiple_images.yy",},"order":0,}, {"id":{"name":"assets_data","path":"scripts/assets_data/assets_data.yy",},"order":0,}, {"id":{"name":"s_node_loop_array","path":"sprites/s_node_loop_array/s_node_loop_array.yy",},"order":23,}, + {"id":{"name":"s_node_iterator_amount","path":"sprites/s_node_iterator_amount/s_node_iterator_amount.yy",},"order":26,}, {"id":{"name":"sh_color_adjust","path":"shaders/sh_color_adjust/sh_color_adjust.yy",},"order":6,}, {"id":{"name":"sh_fd_visualize_thick_smoke_glsl","path":"shaders/sh_fd_visualize_thick_smoke_glsl/sh_fd_visualize_thick_smoke_glsl.yy",},"order":17,}, {"id":{"name":"surface_get_palette","path":"scripts/surface_get_palette/surface_get_palette.yy",},"order":2,}, @@ -541,6 +546,7 @@ {"id":{"name":"node_seperate_shapes","path":"scripts/node_seperate_shapes/node_seperate_shapes.yy",},"order":9,}, {"id":{"name":"node_fluid_domain_queue","path":"scripts/node_fluid_domain_queue/node_fluid_domain_queue.yy",},"order":9,}, {"id":{"name":"node_sequence_to_anim","path":"scripts/node_sequence_to_anim/node_sequence_to_anim.yy",},"order":3,}, + {"id":{"name":"sh_blend_replace","path":"shaders/sh_blend_replace/sh_blend_replace.yy",},"order":50,}, {"id":{"name":"node_rigid_render","path":"scripts/node_rigid_render/node_rigid_render.yy",},"order":3,}, {"id":{"name":"node_image_sheet","path":"scripts/node_image_sheet/node_image_sheet.yy",},"order":4,}, {"id":{"name":"sh_posterize_palette","path":"shaders/sh_posterize_palette/sh_posterize_palette.yy",},"order":12,}, @@ -599,6 +605,7 @@ {"id":{"name":"node_fluid_sim","path":"scripts/node_fluid_sim/node_fluid_sim.yy",},"order":0,}, {"id":{"name":"sh_convolution","path":"shaders/sh_convolution/sh_convolution.yy",},"order":44,}, {"id":{"name":"s_node_statistic","path":"sprites/s_node_statistic/s_node_statistic.yy",},"order":5,}, + {"id":{"name":"s_node_cache_array","path":"sprites/s_node_cache_array/s_node_cache_array.yy",},"order":25,}, {"id":{"name":"sh_blend_alpha_addition","path":"shaders/sh_blend_alpha_addition/sh_blend_alpha_addition.yy",},"order":13,}, {"id":{"name":"widget","path":"scripts/widget/widget.yy",},"order":25,}, {"id":{"name":"node_VFX_effect_vortex","path":"scripts/node_VFX_effect_vortex/node_VFX_effect_vortex.yy",},"order":10,}, @@ -687,6 +694,7 @@ {"id":{"name":"_f_p3","path":"fonts/_f_p3/_f_p3.yy",},"order":7,}, {"id":{"name":"node_group_input","path":"scripts/node_group_input/node_group_input.yy",},"order":1,}, {"id":{"name":"fd_rectangle_set_material_dissipation_type","path":"scripts/fd_rectangle_set_material_dissipation_type/fd_rectangle_set_material_dissipation_type.yy",},"order":4,}, + {"id":{"name":"node_cache_array","path":"scripts/node_cache_array/node_cache_array.yy",},"order":8,}, {"id":{"name":"draw_rect_border","path":"scripts/draw_rect_border/draw_rect_border.yy",},"order":6,}, {"id":{"name":"node_composite","path":"scripts/node_composite/node_composite.yy",},"order":1,}, {"id":{"name":"s_node_path_map","path":"sprites/s_node_path_map/s_node_path_map.yy",},"order":2,}, @@ -701,7 +709,7 @@ {"id":{"name":"libxprocess","path":"extensions/libxprocess/libxprocess.yy",},"order":0,}, {"id":{"name":"sh_mirror","path":"shaders/sh_mirror/sh_mirror.yy",},"order":0,}, {"id":{"name":"sh_cell_noise_random","path":"shaders/sh_cell_noise_random/sh_cell_noise_random.yy",},"order":6,}, - {"id":{"name":"node_iterator_input","path":"scripts/node_iterator_input/node_iterator_input.yy",},"order":2,}, + {"id":{"name":"node_iterator_input","path":"scripts/node_iterator_input/node_iterator_input.yy",},"order":1,}, {"id":{"name":"s_node_atlas","path":"sprites/s_node_atlas/s_node_atlas.yy",},"order":3,}, {"id":{"name":"node_fluid_add","path":"scripts/node_fluid_add/node_fluid_add.yy",},"order":4,}, {"id":{"name":"o_dialog_output_visibility","path":"objects/o_dialog_output_visibility/o_dialog_output_visibility.yy",},"order":2,}, @@ -712,6 +720,7 @@ {"id":{"name":"fd_rectangle_set_collision_mask_surface","path":"scripts/fd_rectangle_set_collision_mask_surface/fd_rectangle_set_collision_mask_surface.yy",},"order":2,}, {"id":{"name":"node_array_length","path":"scripts/node_array_length/node_array_length.yy",},"order":11,}, {"id":{"name":"node_erode","path":"scripts/node_erode/node_erode.yy",},"order":9,}, + {"id":{"name":"draw_circle_angle","path":"scripts/draw_circle_angle/draw_circle_angle.yy",},"order":15,}, {"id":{"name":"node_wrap_mesh","path":"scripts/node_wrap_mesh/node_wrap_mesh.yy",},"order":6,}, {"id":{"name":"node_curve","path":"scripts/node_curve/node_curve.yy",},"order":0,}, {"id":{"name":"sh_alpha_hash","path":"shaders/sh_alpha_hash/sh_alpha_hash.yy",},"order":43,}, @@ -755,7 +764,7 @@ {"id":{"name":"sh_shadow_cast_light_sep","path":"shaders/sh_shadow_cast_light_sep/sh_shadow_cast_light_sep.yy",},"order":1,}, {"id":{"name":"node_grid","path":"scripts/node_grid/node_grid.yy",},"order":16,}, {"id":{"name":"node_edge_detect","path":"scripts/node_edge_detect/node_edge_detect.yy",},"order":8,}, - {"id":{"name":"node_tunnel_in","path":"scripts/node_tunnel_in/node_tunnel_in.yy",},"order":9,}, + {"id":{"name":"node_tunnel_in","path":"scripts/node_tunnel_in/node_tunnel_in.yy",},"order":6,}, {"id":{"name":"node_anim_priority","path":"scripts/node_anim_priority/node_anim_priority.yy",},"order":2,}, {"id":{"name":"s_node_fluidSim_render","path":"sprites/s_node_fluidSim_render/s_node_fluidSim_render.yy",},"order":4,}, {"id":{"name":"o_dialog_crashed","path":"objects/o_dialog_crashed/o_dialog_crashed.yy",},"order":1,}, @@ -904,7 +913,7 @@ {"id":{"name":"libdlgmodule","path":"extensions/libdlgmodule/libdlgmodule.yy",},"order":7,}, {"id":{"name":"draw_background_stretched","path":"scripts/draw_background_stretched/draw_background_stretched.yy",},"order":5,}, {"id":{"name":"s_node_path","path":"sprites/s_node_path/s_node_path.yy",},"order":0,}, - {"id":{"name":"node_tunnel_out","path":"scripts/node_tunnel_out/node_tunnel_out.yy",},"order":10,}, + {"id":{"name":"node_tunnel_out","path":"scripts/node_tunnel_out/node_tunnel_out.yy",},"order":7,}, {"id":{"name":"s_node_array_shuffle","path":"sprites/s_node_array_shuffle/s_node_array_shuffle.yy",},"order":10,}, {"id":{"name":"node_level","path":"scripts/node_level/node_level.yy",},"order":7,}, {"id":{"name":"o_dialog_warning","path":"objects/o_dialog_warning/o_dialog_warning.yy",},"order":10,}, @@ -963,6 +972,7 @@ {"id":{"name":"s_node_zoom","path":"sprites/s_node_zoom/s_node_zoom.yy",},"order":52,}, {"id":{"name":"migration_function","path":"scripts/migration_function/migration_function.yy",},"order":0,}, {"id":{"name":"sh_channel_V","path":"shaders/sh_channel_V/sh_channel_V.yy",},"order":6,}, + {"id":{"name":"__shapes","path":"scripts/__shapes/__shapes.yy",},"order":16,}, {"id":{"name":"node_alpha_to_grey","path":"scripts/node_alpha_to_grey/node_alpha_to_grey.yy",},"order":3,}, {"id":{"name":"shell_helper","path":"scripts/shell_helper/shell_helper.yy",},"order":20,}, {"id":{"name":"o_dialog_preference","path":"objects/o_dialog_preference/o_dialog_preference.yy",},"order":7,}, @@ -975,7 +985,7 @@ {"id":{"name":"node_solid","path":"scripts/node_solid/node_solid.yy",},"order":14,}, {"id":{"name":"sh_blend_luma","path":"shaders/sh_blend_luma/sh_blend_luma.yy",},"order":19,}, {"id":{"name":"fd_rectangle_set_material_dissipation_value","path":"scripts/fd_rectangle_set_material_dissipation_value/fd_rectangle_set_material_dissipation_value.yy",},"order":5,}, - {"id":{"name":"node_iterator_output","path":"scripts/node_iterator_output/node_iterator_output.yy",},"order":3,}, + {"id":{"name":"node_iterator_output","path":"scripts/node_iterator_output/node_iterator_output.yy",},"order":2,}, {"id":{"name":"debug","path":"scripts/debug/debug.yy",},"order":9,}, {"id":{"name":"node_shadow_cast","path":"scripts/node_shadow_cast/node_shadow_cast.yy",},"order":15,}, {"id":{"name":"s_node_3d_obj_combine","path":"sprites/s_node_3d_obj_combine/s_node_3d_obj_combine.yy",},"order":5,}, @@ -1081,13 +1091,13 @@ {"resourceType":"GMFolder","resourceVersion":"1.0","name":"compose","folderPath":"folders/nodes/data/compose.yy","order":15,}, {"resourceType":"GMFolder","resourceVersion":"1.0","name":"feedback","folderPath":"folders/nodes/data/feedback.yy","order":14,}, {"resourceType":"GMFolder","resourceVersion":"1.0","name":"filter","folderPath":"folders/nodes/data/filter.yy","order":1,}, - {"resourceType":"GMFolder","resourceVersion":"1.0","name":"blur","folderPath":"folders/nodes/data/filter/blur.yy","order":57,}, - {"resourceType":"GMFolder","resourceVersion":"1.0","name":"colors","folderPath":"folders/nodes/data/filter/colors.yy","order":61,}, - {"resourceType":"GMFolder","resourceVersion":"1.0","name":"combine","folderPath":"folders/nodes/data/filter/combine.yy","order":58,}, - {"resourceType":"GMFolder","resourceVersion":"1.0","name":"conversion","folderPath":"folders/nodes/data/filter/conversion.yy","order":62,}, - {"resourceType":"GMFolder","resourceVersion":"1.0","name":"effects","folderPath":"folders/nodes/data/filter/effects.yy","order":60,}, - {"resourceType":"GMFolder","resourceVersion":"1.0","name":"fixes","folderPath":"folders/nodes/data/filter/fixes.yy","order":63,}, - {"resourceType":"GMFolder","resourceVersion":"1.0","name":"warps","folderPath":"folders/nodes/data/filter/warps.yy","order":59,}, + {"resourceType":"GMFolder","resourceVersion":"1.0","name":"blur","folderPath":"folders/nodes/data/filter/blur.yy","order":0,}, + {"resourceType":"GMFolder","resourceVersion":"1.0","name":"colors","folderPath":"folders/nodes/data/filter/colors.yy","order":4,}, + {"resourceType":"GMFolder","resourceVersion":"1.0","name":"combine","folderPath":"folders/nodes/data/filter/combine.yy","order":1,}, + {"resourceType":"GMFolder","resourceVersion":"1.0","name":"conversion","folderPath":"folders/nodes/data/filter/conversion.yy","order":5,}, + {"resourceType":"GMFolder","resourceVersion":"1.0","name":"effects","folderPath":"folders/nodes/data/filter/effects.yy","order":3,}, + {"resourceType":"GMFolder","resourceVersion":"1.0","name":"fixes","folderPath":"folders/nodes/data/filter/fixes.yy","order":6,}, + {"resourceType":"GMFolder","resourceVersion":"1.0","name":"warps","folderPath":"folders/nodes/data/filter/warps.yy","order":2,}, {"resourceType":"GMFolder","resourceVersion":"1.0","name":"fluidSim","folderPath":"folders/nodes/data/fluidSim.yy","order":19,}, {"resourceType":"GMFolder","resourceVersion":"1.0","name":"generator","folderPath":"folders/nodes/data/generator.yy","order":4,}, {"resourceType":"GMFolder","resourceVersion":"1.0","name":"group","folderPath":"folders/nodes/data/group.yy","order":6,}, diff --git a/objects/o_dialog_scrollbox/Create_0.gml b/objects/o_dialog_scrollbox/Create_0.gml index 2b1760803..10554face 100644 --- a/objects/o_dialog_scrollbox/Create_0.gml +++ b/objects/o_dialog_scrollbox/Create_0.gml @@ -10,6 +10,7 @@ event_inherited(); scrollbox = noone; initVal = 0; + update_hover = true; anchor = ANCHOR.top | ANCHOR.left; @@ -56,10 +57,12 @@ event_inherited(); _h += hght; } - UNDO_HOLDING = true; - if(hovering > -1) scrollbox.onModify(hovering); - else scrollbox.onModify(initVal); - UNDO_HOLDING = false; + if(update_hover) { + UNDO_HOLDING = true; + if(hovering > -1) scrollbox.onModify(hovering); + else scrollbox.onModify(initVal); + UNDO_HOLDING = false; + } if(sFOCUS) { if(keyboard_check_pressed(vk_up)) { diff --git a/objects/o_main/Step_1.gml b/objects/o_main/Step_1.gml index 32a11f5fd..44ce7a124 100644 --- a/objects/o_main/Step_1.gml +++ b/objects/o_main/Step_1.gml @@ -41,7 +41,10 @@ string_lead_zero(current_minute, 2) + string_lead_zero(current_second, 2) + ".pxc"; - SAVE_AT(loc + fname, "Autosaved "); + try + SAVE_AT(loc + fname, "Autosaved "); + catch(e) + print(exception_print(e)); } #endregion diff --git a/scripts/__shapes/__shapes.gml b/scripts/__shapes/__shapes.gml new file mode 100644 index 000000000..14ad5df04 --- /dev/null +++ b/scripts/__shapes/__shapes.gml @@ -0,0 +1,253 @@ +#region shapes + global.SHAPES = []; + + enum SHAPE_TYPE { + points, + triangles, + } + + function SHAPE_rectangle(_sca) { + var triangles = [ + [[-_sca[0], -_sca[1]], [ _sca[0], -_sca[1]], [-_sca[0], _sca[1]]], + [[ _sca[0], -_sca[1]], [-_sca[0], _sca[1]], [ _sca[0], _sca[1]]], + ]; + return [{ type: SHAPE_TYPE.triangles, triangles: triangles }]; + } + + function SHAPE_circle(_sca, data = {}) { + var prec = max(3, data.side); + var points = []; + + for( var i = 0; i < prec; i++ ) + array_push(points, [ lengthdir_x(0.5, i / prec * 360) * _sca[0] * 2, lengthdir_y(0.5, i / prec * 360) * _sca[1] * 2 ]); + + return [{ type: SHAPE_TYPE.points, points: points }]; + } + + function SHAPE_star(_sca, data = {}) { + var prec = max(3, data.side); + var inner = data.inner; + var triangles = []; + + for( var i = 0; i < prec; i++ ) { + var otx = lengthdir_x(0.5, i / prec * 360) * _sca[0] * 2; + var oty = lengthdir_y(0.5, i / prec * 360) * _sca[1] * 2; + + var inx = lengthdir_x(inner / 2, (i + 0.5) / prec * 360) * _sca[0] * 2; + var iny = lengthdir_y(inner / 2, (i + 0.5) / prec * 360) * _sca[1] * 2; + + array_push(triangles, [ [0, 0], [otx, oty], [inx, iny] ]); + + var inx = lengthdir_x(inner / 2, (i - 0.5) / prec * 360) * _sca[0] * 2; + var iny = lengthdir_y(inner / 2, (i - 0.5) / prec * 360) * _sca[1] * 2; + + array_push(triangles, [ [0, 0], [otx, oty], [inx, iny] ]); + } + + return [{ type: SHAPE_TYPE.triangles, triangles: triangles }]; + } + + function SHAPE_capsule(_sca, data = {}) { + var rad = data.radius; + var prec = max(2, data.side); + var hh = _sca[1] * rad; + var shapes = []; + + var triangles = [ + [[-_sca[0] + _sca[1], -_sca[1]], [ _sca[0] - hh, -hh], [-_sca[0] + _sca[1], _sca[1]]], + [[ _sca[0] - hh, -hh], [-_sca[0] + _sca[1], _sca[1]], [ _sca[0] - hh, hh]], + ]; + shapes[0] = { type: SHAPE_TYPE.triangles, triangles: triangles }; + + var triangles = []; + var cx = -_sca[0] + _sca[1]; + var cy = 0; + var ox, oy, nx, ny, oa, na; + for( var i = 0; i <= prec; i++ ) { + na = lerp(270, 90, i / prec); + nx = cx + lengthdir_x(_sca[1], na); + ny = cy + lengthdir_y(_sca[1], na); + + if(i) array_push(triangles, [[cx, cy], [ox, oy], [nx, ny]]); + + oa = na; + ox = nx; + oy = ny; + } + + shapes[1] = { type: SHAPE_TYPE.triangles, triangles: triangles }; + + var triangles = []; + var cx = _sca[0] - hh; + var cy = 0; + var ox, oy, nx, ny, oa, na; + for( var i = 0; i <= prec; i++ ) { + na = lerp(-90, 90, i / prec); + nx = cx + lengthdir_x(hh, na); + ny = cy + lengthdir_y(hh, na); + + if(i) array_push(triangles, [[cx, cy], [ox, oy], [nx, ny]]); + + oa = na; + ox = nx; + oy = ny; + } + + shapes[2] = { type: SHAPE_TYPE.triangles, triangles: triangles }; + + return shapes; + } + + function SHAPE_ring(_sca, data = {}) { + var prec = max(3, data.side); + var inner = data.inner; + var triangles = []; + + for( var i = 0; i < prec; i++ ) { + var ix0 = lengthdir_x(0.5 * inner, i / prec * 360) * _sca[0] * 2; + var iy0 = lengthdir_y(0.5 * inner, i / prec * 360) * _sca[1] * 2; + + var nx0 = lengthdir_x(0.5, i / prec * 360) * _sca[0] * 2; + var ny0 = lengthdir_y(0.5, i / prec * 360) * _sca[1] * 2; + + var ix1 = lengthdir_x(0.5 * inner, (i + 1) / prec * 360) * _sca[0] * 2; + var iy1 = lengthdir_y(0.5 * inner, (i + 1) / prec * 360) * _sca[1] * 2; + + var nx1 = lengthdir_x(0.5, (i + 1) / prec * 360) * _sca[0] * 2; + var ny1 = lengthdir_y(0.5, (i + 1) / prec * 360) * _sca[1] * 2; + + array_push(triangles, [[ix0, iy0], [nx0, ny0], [nx1, ny1]]); + array_push(triangles, [[ix0, iy0], [nx1, ny1], [ix1, iy1]]); + } + + return [{ type: SHAPE_TYPE.triangles, triangles: triangles }]; + } + + function SHAPE_gear(_sca, data = {}) { + var teeth = max(3, data.teeth); + var teethH = data.teethH; + var teethT = data.teethT; + var prec = teeth * 2; + var inner = data.inner; + var body = 0.5 * (1 - teethH); + var teth = 0.5 * teethH; + var triangles = []; + + for( var i = 0; i < prec; i++ ) { + var ix0 = lengthdir_x(body * inner, i / prec * 360) * _sca[0] * 2; + var iy0 = lengthdir_y(body * inner, i / prec * 360) * _sca[1] * 2; + + var nx0 = lengthdir_x(body, i / prec * 360) * _sca[0] * 2; + var ny0 = lengthdir_y(body, i / prec * 360) * _sca[1] * 2; + + var ix1 = lengthdir_x(body * inner, (i + 1) / prec * 360) * _sca[0] * 2; + var iy1 = lengthdir_y(body * inner, (i + 1) / prec * 360) * _sca[1] * 2; + + var nx1 = lengthdir_x(body, (i + 1) / prec * 360) * _sca[0] * 2; + var ny1 = lengthdir_y(body, (i + 1) / prec * 360) * _sca[1] * 2; + + array_push(triangles, [[ix0, iy0], [nx0, ny0], [nx1, ny1]]); + array_push(triangles, [[ix0, iy0], [nx1, ny1], [ix1, iy1]]); + + if(i % 2) { + var tx0 = nx0 + lengthdir_x(teth, (i + 0.5 - teethT) / prec * 360) * _sca[0] * 2; + var ty0 = ny0 + lengthdir_y(teth, (i + 0.5 - teethT) / prec * 360) * _sca[1] * 2; + + var tx1 = nx1 + lengthdir_x(teth, (i + 0.5 + teethT) / prec * 360) * _sca[0] * 2; + var ty1 = ny1 + lengthdir_y(teth, (i + 0.5 + teethT) / prec * 360) * _sca[1] * 2; + + array_push(triangles, [[tx0, ty0], [nx0, ny0], [nx1, ny1]]); + array_push(triangles, [[tx0, ty0], [nx1, ny1], [tx1, ty1]]); + } + } + + return [{ type: SHAPE_TYPE.triangles, triangles: triangles }]; + } + + function SHAPE_cross(_sca, data = {}) { + var inner = data.inner; + var triangles = []; + var side = min(_sca[0], _sca[1]) * inner; + + array_push(triangles, + [[-side, -_sca[1]], [ side, -_sca[1]], [-side, _sca[1]]], + [[ side, -_sca[1]], [-side, _sca[1]], [ side, _sca[1]]], + ); + + array_push(triangles, + [[-_sca[0], -side], [ _sca[0], -side], [-_sca[0], side]], + [[ _sca[0], -side], [-_sca[0], side], [ _sca[0], side]], + ); + + return [{ type: SHAPE_TYPE.triangles, triangles: triangles }]; + } + + function SHAPE_arc(_sca, data = {}) { + var prec = max(3, data.side); + var inner = data.inner; + var radRan = data.radRan; + var cap = data.cap; + var triangles = []; + + var oa, na; + for( var i = 0; i <= prec; i++ ) { + na = lerp(radRan[0], radRan[1], i / prec); + + if(i) { + var ix0 = lengthdir_x(0.5 * inner, oa) * _sca[0] * 2; + var iy0 = lengthdir_y(0.5 * inner, oa) * _sca[1] * 2; + + var nx0 = lengthdir_x(0.5, oa) * _sca[0] * 2; + var ny0 = lengthdir_y(0.5, oa) * _sca[1] * 2; + + var ix1 = lengthdir_x(0.5 * inner, na) * _sca[0] * 2; + var iy1 = lengthdir_y(0.5 * inner, na) * _sca[1] * 2; + + var nx1 = lengthdir_x(0.5, na) * _sca[0] * 2; + var ny1 = lengthdir_y(0.5, na) * _sca[1] * 2; + + array_push(triangles, [[ix0, iy0], [nx0, ny0], [nx1, ny1]]); + array_push(triangles, [[ix0, iy0], [nx1, ny1], [ix1, iy1]]); + } + + oa = na; + } + + if(cap) { + var cx = lengthdir_x(0.5 * (inner + 1) / 2, radRan[0]) * _sca[0] * 2; + var cy = lengthdir_y(0.5 * (inner + 1) / 2, radRan[0]) * _sca[1] * 2; + var ox, oy, nx, ny, oa, na; + + for( var i = 0; i <= prec; i++ ) { + na = radRan[0] - 180 * i / prec; + nx = cx + lengthdir_x((1 - inner) / 2, na) * _sca[0]; + ny = cy + lengthdir_y((1 - inner) / 2, na) * _sca[1]; + + if(i) array_push(triangles, [[cx, cy], [ox, oy], [nx, ny]]); + + oa = na; + ox = nx; + oy = ny; + } + + var cx = lengthdir_x(0.5 * (inner + 1) / 2, radRan[1]) * _sca[0] * 2; + var cy = lengthdir_y(0.5 * (inner + 1) / 2, radRan[1]) * _sca[1] * 2; + var ox, oy, nx, ny, oa, na; + + for( var i = 0; i <= prec; i++ ) { + na = radRan[1] + 180 * i / prec; + nx = cx + lengthdir_x((1 - inner) / 2, na) * _sca[0]; + ny = cy + lengthdir_y((1 - inner) / 2, na) * _sca[1]; + + if(i) array_push(triangles, [[cx, cy], [ox, oy], [nx, ny]]); + + oa = na; + ox = nx; + oy = ny; + } + } + + return [{ type: SHAPE_TYPE.triangles, triangles: triangles }]; + } + +#endregion \ No newline at end of file diff --git a/scripts/__shapes/__shapes.yy b/scripts/__shapes/__shapes.yy new file mode 100644 index 000000000..88495693a --- /dev/null +++ b/scripts/__shapes/__shapes.yy @@ -0,0 +1,11 @@ +{ + "resourceType": "GMScript", + "resourceVersion": "1.0", + "name": "__shapes", + "isDnD": false, + "isCompatibility": false, + "parent": { + "name": "draw", + "path": "folders/functions/draw.yy", + }, +} \ No newline at end of file diff --git a/scripts/draw_circle_angle/draw_circle_angle.gml b/scripts/draw_circle_angle/draw_circle_angle.gml new file mode 100644 index 000000000..1603e1790 --- /dev/null +++ b/scripts/draw_circle_angle/draw_circle_angle.gml @@ -0,0 +1,23 @@ +function draw_circle_angle(_x, _y, _r, _angSt, _angEd, precision = 32) { + var ox, oy, nx, ny, oa, na; + + draw_primitive_begin(pr_trianglelist); + + for( var i = 0; i <= precision; i++ ) { + na = lerp(_angSt, _angEd, i / precision); + nx = _x + lengthdir_x(_r, na); + ny = _y + lengthdir_y(_r, na); + + if(i) { + draw_vertex(_x, _y); + draw_vertex(ox, oy); + draw_vertex(nx, ny); + } + + oa = na; + ox = nx; + oy = ny; + } + + draw_primitive_end(); +} \ No newline at end of file diff --git a/scripts/draw_circle_angle/draw_circle_angle.yy b/scripts/draw_circle_angle/draw_circle_angle.yy new file mode 100644 index 000000000..9a62f7390 --- /dev/null +++ b/scripts/draw_circle_angle/draw_circle_angle.yy @@ -0,0 +1,11 @@ +{ + "resourceType": "GMScript", + "resourceVersion": "1.0", + "name": "draw_circle_angle", + "isDnD": false, + "isCompatibility": false, + "parent": { + "name": "draw", + "path": "folders/functions/draw.yy", + }, +} \ No newline at end of file diff --git a/scripts/draw_line_width2/draw_line_width2.gml b/scripts/draw_line_width2/draw_line_width2.gml index 8fde2b207..611762e19 100644 --- a/scripts/draw_line_width2/draw_line_width2.gml +++ b/scripts/draw_line_width2/draw_line_width2.gml @@ -23,17 +23,18 @@ function draw_line_width2(x0, y0, x1, y1, w0, w1, cap = false) { } } -function draw_line_width2_angle(x0, y0, x1, y1, w0, w1, a0 = 0, a1 = 0) { +function draw_line_width2_angle(x0, y0, x1, y1, w0, w1, a0 = 0, a1 = 0, _oc = c_white, _nc = c_white) { var _x0 = x0 + lengthdir_x(w0 / 2, a0); var _y0 = y0 + lengthdir_y(w0 / 2, a0); var _x1 = x1 + lengthdir_x(w1 / 2, a1); var _y1 = y1 + lengthdir_y(w1 / 2, a1); + //draw_set_color(c_red); draw_primitive_begin(pr_trianglestrip); - draw_vertex( x0, y0); - draw_vertex( x1, y1); - draw_vertex(_x0, _y0); - draw_vertex(_x1, _y1); + draw_vertex_color( x0, y0, _oc, 1); + draw_vertex_color( x1, y1, _nc, 1); + draw_vertex_color(_x0, _y0, _oc, 1); + draw_vertex_color(_x1, _y1, _nc, 1); draw_primitive_end(); var _x0 = x0 + lengthdir_x(w0 / 2, a0 + 180); @@ -41,10 +42,11 @@ function draw_line_width2_angle(x0, y0, x1, y1, w0, w1, a0 = 0, a1 = 0) { var _x1 = x1 + lengthdir_x(w1 / 2, a1 + 180); var _y1 = y1 + lengthdir_y(w1 / 2, a1 + 180); + //draw_set_color(c_blue); draw_primitive_begin(pr_trianglestrip); - draw_vertex( x0, y0); - draw_vertex( x1, y1); - draw_vertex(_x0, _y0); - draw_vertex(_x1, _y1); + draw_vertex_color( x0, y0, _oc, 1); + draw_vertex_color( x1, y1, _nc, 1); + draw_vertex_color(_x0, _y0, _oc, 1); + draw_vertex_color(_x1, _y1, _nc, 1); draw_primitive_end(); } \ No newline at end of file diff --git a/scripts/draw_surface_blend/draw_surface_blend.gml b/scripts/draw_surface_blend/draw_surface_blend.gml index 5d81b50d8..105333013 100644 --- a/scripts/draw_surface_blend/draw_surface_blend.gml +++ b/scripts/draw_surface_blend/draw_surface_blend.gml @@ -1,5 +1,5 @@ globalvar BLEND_TYPES; -BLEND_TYPES = [ "Normal", "Add", "Subtract", "Multiply", "Screen", "Overlay", "Hue", "Saturation", "Luminosity", "Maximum", "Minimum" ]; +BLEND_TYPES = [ "Normal", "Add", "Subtract", "Multiply", "Screen", "Overlay", "Hue", "Saturation", "Luminosity", "Maximum", "Minimum", "Replace" ]; function draw_surface_blend(background, foreground, blend, alpha, _pre_alp = true, _mask = 0, tile = 0) { if(!is_surface(background)) return; @@ -18,6 +18,7 @@ function draw_surface_blend(background, foreground, blend, alpha, _pre_alp = tru case "Maximum" : sh = sh_blend_max; break; case "Minimum" : sh = sh_blend_min; break; + case "Replace" : sh = sh_blend_replace; break; default: return; } diff --git a/scripts/lerp_float/lerp_float.gml b/scripts/lerp_float/lerp_float.gml index 0a6a2b7ff..d7cc90cea 100644 --- a/scripts/lerp_float/lerp_float.gml +++ b/scripts/lerp_float/lerp_float.gml @@ -21,6 +21,10 @@ function lerp_linear(from, to, speed) { return from + sign(to - from) * speed; } +function lerp_angle_direct(from, to, speed) { + return from + angle_difference(to, from) * speed; +} + function lerp_angle(from, to, speed) { if(fps < 15) return to; return from + angle_difference(to, from) * (1 - power(1 - 1 / speed, delta_time / 1000000 * room_speed)); diff --git a/scripts/node_blend/node_blend.gml b/scripts/node_blend/node_blend.gml index c2c526282..b56b7814d 100644 --- a/scripts/node_blend/node_blend.gml +++ b/scripts/node_blend/node_blend.gml @@ -30,7 +30,7 @@ function Node_Blend(_x, _y, _group = -1) : Node_Processor(_x, _y, _group) constr inputs[| 8] = nodeValue("Active", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, true); active_index = 8; - inputs[| 9] = nodeValue("Preserve alpha", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, true); + inputs[| 9] = nodeValue("Preserve alpha", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, false); inputs[| 10] = nodeValue("Horizontal Align", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0) .setDisplay(VALUE_DISPLAY.enum_button, [ THEME.inspector_surface_halign, THEME.inspector_surface_halign, THEME.inspector_surface_halign]); diff --git a/scripts/node_cache_array/node_cache_array.gml b/scripts/node_cache_array/node_cache_array.gml new file mode 100644 index 000000000..b101e5ba7 --- /dev/null +++ b/scripts/node_cache_array/node_cache_array.gml @@ -0,0 +1,21 @@ +function Node_Cache_Array(_x, _y, _group = -1) : Node(_x, _y, _group) constructor { + name = "Cache Array"; + use_cache = true; + + inputs[| 0] = nodeValue("Surface in", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, 0); + + outputs[| 0] = nodeValue("Cache array", self, JUNCTION_CONNECT.output, VALUE_TYPE.surface, []); + + input_display_list = [ + ["Surface", true], 0, + ]; + + static update = function() { + if(!inputs[| 0].value_from) return; + if(!ANIMATOR.is_playing) return; + + var _surf = inputs[| 0].getValue(); + cacheCurrentFrame(_surf); + outputs[| 0].setValue(cached_output); + } +} \ No newline at end of file diff --git a/scripts/node_cache_array/node_cache_array.yy b/scripts/node_cache_array/node_cache_array.yy new file mode 100644 index 000000000..8018b05b6 --- /dev/null +++ b/scripts/node_cache_array/node_cache_array.yy @@ -0,0 +1,11 @@ +{ + "resourceType": "GMScript", + "resourceVersion": "1.0", + "name": "node_cache_array", + "isDnD": false, + "isCompatibility": false, + "parent": { + "name": "node", + "path": "folders/nodes/data/node.yy", + }, +} \ No newline at end of file diff --git a/scripts/node_cache_array/node_outline.yy b/scripts/node_cache_array/node_outline.yy new file mode 100644 index 000000000..86468bc09 --- /dev/null +++ b/scripts/node_cache_array/node_outline.yy @@ -0,0 +1,12 @@ +{ + "isDnD": false, + "isCompatibility": false, + "parent": { + "name": "process", + "path": "folders/nodes/data/process.yy", + }, + "resourceVersion": "1.0", + "name": "node_outline", + "tags": [], + "resourceType": "GMScript", +} \ No newline at end of file diff --git a/scripts/node_collection/node_collection.gml b/scripts/node_collection/node_collection.gml index 487fcbb30..02f24bf71 100644 --- a/scripts/node_collection/node_collection.gml +++ b/scripts/node_collection/node_collection.gml @@ -61,6 +61,8 @@ function upgroupNode(collection, record = true) { function Node_Collection(_x, _y, _group = -1) : Node(_x, _y, _group) constructor { nodes = ds_list_create(); ungroupable = true; + auto_render_time = false; + combine_render_time = true; custom_input_index = 0; custom_output_index = 0; @@ -80,6 +82,7 @@ function Node_Collection(_x, _y, _group = -1) : Node(_x, _y, _group) constructor static getNextNodes = function() { for(var i = custom_input_index; i < ds_list_size(inputs); i++) { var _in = inputs[| i].from; + if(!_in.renderActive) continue; ds_queue_enqueue(RENDER_QUEUE, _in); printIf(global.RENDER_LOG, "Push group input " + _in.name + " to stack"); @@ -183,10 +186,12 @@ function Node_Collection(_x, _y, _group = -1) : Node(_x, _y, _group) constructor } static step = function() { - render_time = 0; + if(combine_render_time) render_time = 0; + for(var i = 0; i < ds_list_size(nodes); i++) { nodes[| i].step(); - render_time += nodes[| i].render_time; + if(combine_render_time) + render_time += nodes[| i].render_time; } if(PANEL_GRAPH.node_focus == self && panelFocus(PANEL_GRAPH) && DOUBLE_CLICK) { diff --git a/scripts/node_data/node_data.gml b/scripts/node_data/node_data.gml index f20384edb..7b411d630 100644 --- a/scripts/node_data/node_data.gml +++ b/scripts/node_data/node_data.gml @@ -2,6 +2,7 @@ global.loop_nodes = [ "Node_Iterate", "Node_Iterate_Each" ]; function Node(_x, _y, _group = PANEL_GRAPH.getCurrentContext()) constructor { active = true; + renderActive = true; node_id = generateUUID(); group = _group; destroy_when_upgroup = false; @@ -59,6 +60,7 @@ function Node(_x, _y, _group = PANEL_GRAPH.getCurrentContext()) constructor { rendered = false; update_on_frame = false; render_time = 0; + auto_render_time = true; use_cache = false; cached_output = []; @@ -252,7 +254,8 @@ function Node(_x, _y, _group = PANEL_GRAPH.getCurrentContext()) constructor { var t = get_timer(); update(); setRenderStatus(true); - render_time = get_timer() - t; + if(auto_render_time) + render_time = get_timer() - t; } catch(exception) { var sCurr = surface_get_target(); while(surface_get_target() != sBase) @@ -277,8 +280,12 @@ function Node(_x, _y, _group = PANEL_GRAPH.getCurrentContext()) constructor { for(var j = 0; j < ds_list_size(inputs); j++) { var _in = inputs[| j]; - if(_in.value_from == noone) continue; - if (!_in.value_from.node.rendered) + var val_from = _in.value_from; + if(val_from == noone) continue; + if(!val_from.node.active) continue; + if(!val_from.node.renderActive) continue; + + if (!val_from.node.rendered) return false; } @@ -355,7 +362,8 @@ function Node(_x, _y, _group = PANEL_GRAPH.getCurrentContext()) constructor { static drawNodeBase = function(xx, yy, _s) { if(!active) return; - draw_sprite_stretched_ext(bg_spr, 0, xx, yy, w * _s, h * _s, color, 0.75); + var aa = 0.25 + 0.5 * renderActive; + draw_sprite_stretched_ext(bg_spr, 0, xx, yy, w * _s, h * _s, color, aa); } static drawGetBbox = function(xx, yy, _s) { @@ -377,13 +385,15 @@ function Node(_x, _y, _group = PANEL_GRAPH.getCurrentContext()) constructor { static drawNodeName = function(xx, yy, _s) { if(!active) return; + draw_name = false; var _name = display_name == ""? name : display_name; if(_name == "") return; if(_s < 0.75) return; draw_name = true; - draw_sprite_stretched_ext(THEME.node_bg_name, 0, xx, yy, w * _s, ui(20), color, 0.75); + var aa = 0.25 + 0.5 * renderActive; + draw_sprite_stretched_ext(THEME.node_bg_name, 0, xx, yy, w * _s, ui(20), color, aa); var cc = COLORS._main_text; if(PREF_MAP[? "node_show_render_status"] && !rendered) @@ -394,11 +404,16 @@ function Node(_x, _y, _group = PANEL_GRAPH.getCurrentContext()) constructor { if(hasInspectorUpdate()) icon = THEME.refresh_s; var ts = clamp(power(_s, 0.5), 0.5, 1); + var aa = 0.5 + 0.5 * renderActive; + draw_set_alpha(aa); + if(icon && _s > 0.75) { - draw_sprite_ui_uniform(icon, 0, xx + ui(12), yy + ui(10)); + draw_sprite_ui_uniform(icon, 0, xx + ui(12), yy + ui(10),,, aa); draw_text_cut(xx + ui(24), yy + ui(10), _name, w * _s - ui(24), ts); } else draw_text_cut(xx + ui(8), yy + ui(10), _name, w * _s - ui(8), ts); + + draw_set_alpha(1); } static drawJunctions = function(_x, _y, _mx, _my, _s) { @@ -552,8 +567,9 @@ function Node(_x, _y, _group = PANEL_GRAPH.getCurrentContext()) constructor { var ps = min((w * _s - 8) / pw, (h * _s - 8) / ph); var px = xx + w * _s / 2 - pw * ps / 2; var py = yy + h * _s / 2 - ph * ps / 2; - - draw_surface_ext_safe(surf, px, py, ps, ps, 0, c_white, 1); + + var aa = 0.5 + 0.5 * renderActive; + draw_surface_ext_safe(surf, px, py, ps, ps, 0, c_white, aa); } static getNodeDimension = function() { @@ -725,6 +741,9 @@ function Node(_x, _y, _group = PANEL_GRAPH.getCurrentContext()) constructor { static onDestroy = function() {} static isRenderable = function(trigger = false) { + if(!active) return false; + if(!renderActive) return false; + var _startNode = true; for(var j = 0; j < ds_list_size(inputs); j++) { var _in = inputs[| j]; @@ -732,8 +751,9 @@ function Node(_x, _y, _group = PANEL_GRAPH.getCurrentContext()) constructor { if(trigger) triggerRender(); - - if(_in.value_from != noone && !_in.value_from.node.rendered) + + var val_from = _in.value_from; + if(val_from != noone && !val_from.node.rendered && val_from.node.active && val_from.node.renderActive) _startNode = false; } return _startNode; @@ -746,6 +766,7 @@ function Node(_x, _y, _group = PANEL_GRAPH.getCurrentContext()) constructor { for(var j = 0; j < ds_list_size(_ot.value_to); j++) { var _to = _ot.value_to[| j]; + if(!_to.node.renderActive) continue; if(!_to.node.active || _to.value_from == noone) continue; if(_to.value_from.node != self) continue; @@ -776,23 +797,24 @@ function Node(_x, _y, _group = PANEL_GRAPH.getCurrentContext()) constructor { cacheArrayCheck(); if(ANIMATOR.current_frame > ANIMATOR.frames_total) return; - var _os = cached_output[ANIMATOR.current_frame]; - if(is_surface(_os)) - surface_copy_size(_os, _frame); - else { - _os = surface_clone(_frame); - cached_output[ANIMATOR.current_frame] = _os; - } + cached_output[ANIMATOR.current_frame] = surface_clone(_frame, cached_output[ANIMATOR.current_frame]); array_safe_set(cache_result, ANIMATOR.current_frame, true); } + static cacheExist = function(frame = ANIMATOR.current_frame) { if(frame >= array_length(cached_output)) return false; if(frame >= array_length(cache_result)) return false; - if(!array_safe_get(cache_result, frame)) return false; + //if(!array_safe_get(cache_result, frame)) return false; return true; } + static getCacheFrame = function(frame = ANIMATOR.current_frame) { + if(!cacheExist(frame)) return noone; + var surf = array_safe_get(cached_output, frame); + return surf; + } + static recoverCache = function(frame = ANIMATOR.current_frame) { if(!cacheExist(frame)) return false; @@ -810,6 +832,8 @@ function Node(_x, _y, _group = PANEL_GRAPH.getCurrentContext()) constructor { return true; } static clearCache = function() { + return; + if(array_length(cached_output) != ANIMATOR.frames_total + 1) array_resize(cached_output, ANIMATOR.frames_total + 1); for(var i = 0; i < array_length(cached_output); i++) { @@ -904,12 +928,13 @@ function Node(_x, _y, _group = PANEL_GRAPH.getCurrentContext()) constructor { var _map = ds_map_create(); if(!preset) { - _map[? "id"] = node_id; - _map[? "name"] = display_name; - _map[? "x"] = x; - _map[? "y"] = y; - _map[? "type"] = instanceof(self); - _map[? "group"] = group == -1? -1 : group.node_id; + _map[? "id"] = node_id; + _map[? "render"] = renderActive; + _map[? "name"] = display_name; + _map[? "x"] = x; + _map[? "y"] = y; + _map[? "type"] = instanceof(self); + _map[? "group"] = group == -1? -1 : group.node_id; } ds_map_add_map(_map, "attri", attributeSerialize()); @@ -950,6 +975,7 @@ function Node(_x, _y, _group = PANEL_GRAPH.getCurrentContext()) constructor { x = ds_map_try_get(load_map, "x"); y = ds_map_try_get(load_map, "y"); + renderActive = ds_map_try_get(load_map, "render", true); } if(ds_map_exists(load_map, "attri")) diff --git a/scripts/node_export/node_export.gml b/scripts/node_export/node_export.gml index 5566cbb6e..a75e8339d 100644 --- a/scripts/node_export/node_export.gml +++ b/scripts/node_export/node_export.gml @@ -43,6 +43,7 @@ function Node_Export(_x, _y, _group = -1) : Node(_x, _y, _group) constructor { inputs[| 3] = nodeValue("Type", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0) .setDisplay(VALUE_DISPLAY.enum_scroll, format_single) .rejectArray(); + inputs[| 3].editWidget.update_hover = false; inputs[| 4] = nodeValue("Template guides", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0) .setDisplay(VALUE_DISPLAY.label, @@ -74,6 +75,7 @@ function Node_Export(_x, _y, _group = -1) : Node(_x, _y, _group) constructor { inputs[| 9] = nodeValue("Format", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0) .setDisplay(VALUE_DISPLAY.enum_scroll, format_image) .rejectArray(); + inputs[| 9].editWidget.update_hover = false; inputs[| 10] = nodeValue("Quality", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 80) .setDisplay(VALUE_DISPLAY.slider, [0, 100, 1]) diff --git a/scripts/node_feedback/node_feedback.gml b/scripts/node_feedback/node_feedback.gml index c713d8575..ea522c0ad 100644 --- a/scripts/node_feedback/node_feedback.gml +++ b/scripts/node_feedback/node_feedback.gml @@ -22,6 +22,8 @@ function Node_Feedback(_x, _y, _group = -1) : Node_Collection(_x, _y, _group) co var allReady = true; for(var i = custom_input_index; i < ds_list_size(inputs); i++) { var _in = inputs[| i].from; + if(!_in.renderActive) continue; + allReady &= _in.isUpdateReady() } diff --git a/scripts/node_feedback_input/node_feedback_input.gml b/scripts/node_feedback_input/node_feedback_input.gml index 6ffffd027..313aed155 100644 --- a/scripts/node_feedback_input/node_feedback_input.gml +++ b/scripts/node_feedback_input/node_feedback_input.gml @@ -1,5 +1,5 @@ function Node_Feedback_Input(_x, _y, _group = -1) : Node_Group_Input(_x, _y, _group) constructor { - name = "Input"; + name = "Feedback Input"; color = COLORS.node_blend_feedback; w = 96; diff --git a/scripts/node_feedback_output/node_feedback_output.gml b/scripts/node_feedback_output/node_feedback_output.gml index e9c12c98a..1119ee251 100644 --- a/scripts/node_feedback_output/node_feedback_output.gml +++ b/scripts/node_feedback_output/node_feedback_output.gml @@ -1,5 +1,5 @@ function Node_Feedback_Output(_x, _y, _group = -1) : Node_Group_Output(_x, _y, _group) constructor { - name = "Output"; + name = "Feedback Output"; color = COLORS.node_blend_feedback; w = 96; diff --git a/scripts/node_functions/node_functions.gml b/scripts/node_functions/node_functions.gml index 00f008e57..54fc3dbc5 100644 --- a/scripts/node_functions/node_functions.gml +++ b/scripts/node_functions/node_functions.gml @@ -1,2 +1,132 @@ #macro def_surf_size PREF_MAP[? "default_surface_side"] #macro def_surf_size2 [PREF_MAP[? "default_surface_side"], PREF_MAP[? "default_surface_side"]] + +#region + function node_draw_transform_init() { + drag_type = -1; + dragging_sx = 0; + dragging_sy = 0; + dragging_mx = 0; + dragging_my = 0; + rot_anc_x = 0; + rot_anc_y = 0; + } + + function node_draw_transform_box(active, _x, _y, _s, _mx, _my, _snx, _sny, _posInd, _rotInd, _scaInd) { + var _pos = inputs[| _posInd].getValue(); + var _rot = inputs[| _rotInd].getValue(); + var _sca = inputs[| _scaInd].getValue(); + + if(drag_type > -1) { + if(drag_type == 0) { + var _dx = (_mx - dragging_mx) / _s; + var _dy = (_my - dragging_my) / _s; + + if(key_mod_press(SHIFT)) { + if(abs(_dx) > abs(_dy) + ui(16)) + _dy = 0; + else if(abs(_dy) > abs(_dx) + ui(16)) + _dx = 0; + else { + _dx = max(_dx, _dy); + _dy = _dx; + } + } + + _pos[0] = value_snap(dragging_sx + _dx, _snx); + _pos[1] = value_snap(dragging_sy + _dy, _sny); + + if(inputs[| _posInd].setValue(_pos)) + UNDO_HOLDING = true; + + if(inputs[| _posInd].unit.mode == VALUE_UNIT.reference) { + var p = [ _pos[0], _pos[1] ]; + _pos = inputs[| _posInd].unit.apply(p); + } + } else if(drag_type == 1) { + var aa = point_direction(rot_anc_x, rot_anc_y, _mx, _my); + var da = angle_difference(dragging_mx, aa); + + if(key_mod_press(CTRL)) + _rot = round((dragging_sx - da) / 15) * 15; + else + _rot = dragging_sx - da; + + if(inputs[| _rotInd].setValue(_rot)) + UNDO_HOLDING = true; + } else if(drag_type == 2) { + var _p = point_rotate(_mx - dragging_mx, _my - dragging_my, 0, 0, -_rot); + _sca[0] = _p[0] / _s; + _sca[1] = _p[1] / _s; + + if(key_mod_press(SHIFT)) { + _sca[0] = min(_sca[0], _sca[1]); + _sca[1] = min(_sca[0], _sca[1]); + } + + if(inputs[| _scaInd].setValue(_sca)) + UNDO_HOLDING = true; + } + + if(mouse_release(mb_left)) { + drag_type = -1; + UNDO_HOLDING = false; + } + } + + var p0 = point_rotate(-_sca[0], -_sca[1], 0, 0, _rot); + var p1 = point_rotate( _sca[0], -_sca[1], 0, 0, _rot); + var p2 = point_rotate(-_sca[0], _sca[1], 0, 0, _rot); + var p3 = point_rotate( _sca[0], _sca[1], 0, 0, _rot); + var pr = point_rotate( 0, -_sca[1] - 1, 0, 0, _rot); + + var pd0x = _x + (p0[0] + _pos[0]) * _s; var pd0y = _y + (p0[1] + _pos[1]) * _s; + var pd1x = _x + (p1[0] + _pos[0]) * _s; var pd1y = _y + (p1[1] + _pos[1]) * _s; + var pd2x = _x + (p2[0] + _pos[0]) * _s; var pd2y = _y + (p2[1] + _pos[1]) * _s; + var pd3x = _x + (p3[0] + _pos[0]) * _s; var pd3y = _y + (p3[1] + _pos[1]) * _s; + var prx = _x + (pr[0] + _pos[0]) * _s; var pry = _y + (pr[1] + _pos[1]) * _s; + + var hovering = -1; + + if(drag_type == -1) { + if(point_in_rectangle_points(_mx, _my, pd0x, pd0y, pd1x, pd1y, pd2x, pd2y, pd3x, pd3y)) + hovering = 0; + if(point_in_circle(_mx, _my, prx, pry, 12)) + hovering = 1; + if(point_in_circle(_mx, _my, pd3x, pd3y, 12)) + hovering = 2; + } + + draw_set_color(COLORS._main_accent); + draw_line_width(pd0x, pd0y, pd1x, pd1y, hovering == 0? 2 : 1); + draw_line_width(pd0x, pd0y, pd2x, pd2y, hovering == 0? 2 : 1); + draw_line_width(pd3x, pd3y, pd1x, pd1y, hovering == 0? 2 : 1); + draw_line_width(pd3x, pd3y, pd2x, pd2y, hovering == 0? 2 : 1); + + draw_sprite_ui_uniform(THEME.anchor_rotate, hovering == 1, prx, pry,,,, _rot); + draw_sprite_ui_uniform(THEME.anchor_scale, hovering == 2, pd3x, pd3y,,,, _rot); + + if(hovering == -1) return; + if(drag_type > -1) return; + + if(mouse_press(mb_left, active)) { + drag_type = hovering; + if(hovering == 0) { + dragging_sx = _pos[0]; + dragging_sy = _pos[1]; + dragging_mx = _mx; + dragging_my = _my; + } else if(hovering == 1) { //rot + dragging_sx = _rot; + rot_anc_x = _x + _pos[0] * _s; + rot_anc_y = _y + _pos[1] * _s; + dragging_mx = point_direction(rot_anc_x, rot_anc_y, _mx, _my); + } else if(hovering == 2) { //sca + dragging_sx = _sca[0]; + dragging_sy = _sca[1]; + dragging_mx = _x + _pos[0] * _s; + dragging_my = _y + _pos[1] * _s; + } + } + } +#endregion \ No newline at end of file diff --git a/scripts/node_grid/node_grid.gml b/scripts/node_grid/node_grid.gml index 32b877303..d8550c851 100644 --- a/scripts/node_grid/node_grid.gml +++ b/scripts/node_grid/node_grid.gml @@ -81,7 +81,7 @@ function Node_Grid(_x, _y, _group = -1) : Node_Processor(_x, _y, _group) constru shader_set_uniform_f(uniform_wid, _wid); shader_set_uniform_f(uniform_ang, degtorad(_ang)); shader_set_uniform_f(uniform_sam, is_surface(_sam)); - shader_set_uniform_f(uniform_shf, _shf); + shader_set_uniform_f(uniform_shf, _shx? _shf / _sca[1] : _shf / _sca[0]); shader_set_uniform_i(uniform_shx, _shx); shader_set_uniform_i(uniform_hgt, _hgt); shader_set_uniform_f_array_safe(uniform_col1, colToVec4(_col1)); diff --git a/scripts/node_group_input/node_group_input.gml b/scripts/node_group_input/node_group_input.gml index b1e86a80f..ce4e1756d 100644 --- a/scripts/node_group_input/node_group_input.gml +++ b/scripts/node_group_input/node_group_input.gml @@ -1,5 +1,5 @@ function Node_Group_Input(_x, _y, _group = -1) : Node(_x, _y, _group) constructor { - name = "Input"; + name = "Group Input"; destroy_when_upgroup = true; color = COLORS.node_blend_collection; previewable = false; @@ -39,6 +39,7 @@ function Node_Group_Input(_x, _y, _group = -1) : Node(_x, _y, _group) constructo inputs[| 2] = nodeValue("Input type", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0) .setDisplay(VALUE_DISPLAY.enum_scroll, [ "Integer", "Float", "Boolean", "Color", "Surface", "Path", "Curve", "Text", "Object", "Node", "3D object", "Any" ]) .rejectArray(); + inputs[| 2].editWidget.update_hover = false; inputs[| 3] = nodeValue("Enum label", self, JUNCTION_CONNECT.input, VALUE_TYPE.text, "") .setVisible(false) @@ -48,6 +49,7 @@ function Node_Group_Input(_x, _y, _group = -1) : Node(_x, _y, _group) constructo .setDisplay(VALUE_DISPLAY.enum_button, [ "2", "3", "4" ]) .setVisible(false) .rejectArray(); + inputs[| 2].editWidget.update_hover = false; inputs[| 5] = nodeValue("Order", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0) .rejectArray(); diff --git a/scripts/node_group_output/node_group_output.gml b/scripts/node_group_output/node_group_output.gml index 6e7897163..873e81d93 100644 --- a/scripts/node_group_output/node_group_output.gml +++ b/scripts/node_group_output/node_group_output.gml @@ -1,5 +1,5 @@ function Node_Group_Output(_x, _y, _group = -1) : Node(_x, _y, _group) constructor { - name = "Output"; + name = "Group Output"; destroy_when_upgroup = true; color = COLORS.node_blend_collection; previewable = false; @@ -31,6 +31,7 @@ function Node_Group_Output(_x, _y, _group = -1) : Node(_x, _y, _group) construct for(var j = 0; j < ds_list_size(outParent.value_to); j++) { var _to = outParent.value_to[| j]; + if(!_to.node.renderActive) continue; printIf(global.RENDER_LOG, "Value to " + _to.name); if(!_to.node.active || _to.value_from == noone) { diff --git a/scripts/node_iterate/node_iterate.gml b/scripts/node_iterate/node_iterate.gml index 23a4aea60..4612c3acc 100644 --- a/scripts/node_iterate/node_iterate.gml +++ b/scripts/node_iterate/node_iterate.gml @@ -9,6 +9,7 @@ function Node_Iterate(_x, _y, _group = -1) : Node_Collection(_x, _y, _group) con color = COLORS.node_blend_loop; icon = THEME.loop; + combine_render_time = false; iterated = 0; inputs[| 0] = nodeValue("Repeat", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 1 ); @@ -42,6 +43,8 @@ function Node_Iterate(_x, _y, _group = -1) : Node_Collection(_x, _y, _group) con var allReady = true; for(var i = custom_input_index; i < ds_list_size(inputs); i++) { var _in = inputs[| i].from; + if(!_in.renderActive) continue; + allReady &= _in.isUpdateReady() } diff --git a/scripts/node_iterate_each/node_iterate_each.gml b/scripts/node_iterate_each/node_iterate_each.gml index 13f9afc4f..d6f5da674 100644 --- a/scripts/node_iterate_each/node_iterate_each.gml +++ b/scripts/node_iterate_each/node_iterate_each.gml @@ -3,6 +3,7 @@ function Node_Iterate_Each(_x, _y, _group = -1) : Node_Collection(_x, _y, _group color = COLORS.node_blend_loop; icon = THEME.loop; + combine_render_time = false; iterated = 0; inputs[| 0] = nodeValue("Array", self, JUNCTION_CONNECT.input, VALUE_TYPE.any, [] ) @@ -36,12 +37,13 @@ function Node_Iterate_Each(_x, _y, _group = -1) : Node_Collection(_x, _y, _group iterated = 0; loop_start_time = get_timer(); - var arrIn = inputs[| 0].getValue(); - var maxIter = is_array(arrIn)? array_length(arrIn) : 0; - var arrOut = array_create(maxIter); - outputs[| 0].setValue(arrOut); + var arrIn = inputs[| 0].getValue(); + var arrOut = outputs[| 0].getValue(); - // + if(array_length(arrOut) != array_length(arrIn)) { + surface_array_free(arrOut); + outputs[| 0].setValue([]) + } printIf(global.RENDER_LOG, " > Loop begin"); } diff --git a/scripts/node_iterator_each_input/node_iterator_each_input.gml b/scripts/node_iterator_each_input/node_iterator_each_input.gml index fd450e556..9158f787d 100644 --- a/scripts/node_iterator_each_input/node_iterator_each_input.gml +++ b/scripts/node_iterator_each_input/node_iterator_each_input.gml @@ -1,5 +1,5 @@ function Node_Iterator_Each_Input(_x, _y, _group = -1) : Node(_x, _y, _group) constructor { - name = "Input"; + name = "Loop Input"; color = COLORS.node_blend_loop; manual_deletable = false; diff --git a/scripts/node_iterator_each_output/node_iterator_each_output.gml b/scripts/node_iterator_each_output/node_iterator_each_output.gml index e9f45a13f..ebdd2a173 100644 --- a/scripts/node_iterator_each_output/node_iterator_each_output.gml +++ b/scripts/node_iterator_each_output/node_iterator_each_output.gml @@ -1,5 +1,5 @@ function Node_Iterator_Each_Output(_x, _y, _group = -1) : Node(_x, _y, _group) constructor { - name = "Output"; + name = "Loop Output"; color = COLORS.node_blend_loop; manual_deletable = false; @@ -24,6 +24,7 @@ function Node_Iterator_Each_Output(_x, _y, _group = -1) : Node(_x, _y, _group) c var _ot = group.outputs[| 0]; for(var j = 0; j < ds_list_size(_ot.value_to); j++) { var _to = _ot.value_to[| j]; + if(!_to.node.renderActive) continue; if(_to.node.active && _to.value_from != noone && _to.value_from.node == group) { _to.node.triggerRender(); @@ -47,13 +48,11 @@ function Node_Iterator_Each_Output(_x, _y, _group = -1) : Node(_x, _y, _group) c if(inputs[| 0].value_from == noone) return _prev_val; var is_surf = inputs[| 0].value_from.type == VALUE_TYPE.surface; - var _new_val; + var _new_val = []; surface_array_free(_prev_val); - if(is_surf) - _new_val = surface_array_clone(_val); - else - _new_val = array_clone(_val); + if(is_surf) _new_val = surface_array_clone(_val); + else _new_val = array_clone(_val); return _new_val; } @@ -69,7 +68,8 @@ function Node_Iterator_Each_Output(_x, _y, _group = -1) : Node(_x, _y, _group) c var _val = group.outputs[| 0].getValue(); if(!is_array(_val)) return; - _val[ind] = cloneValue(array_safe_get(_val, ind), inputs[| 0].getValue()); + _val[@ ind] = cloneValue(array_safe_get(_val, ind), inputs[| 0].getValue()); + group.outputs[| 0].setValue(_val); outputs[| 0].setValue(_val); } diff --git a/scripts/node_iterator_each_size/node_iterator_each_size.gml b/scripts/node_iterator_each_size/node_iterator_each_size.gml new file mode 100644 index 000000000..2f857a5e6 --- /dev/null +++ b/scripts/node_iterator_each_size/node_iterator_each_size.gml @@ -0,0 +1,22 @@ +function Node_Iterator_Each_Length(_x, _y, _group = -1) : Node(_x, _y, _group) constructor { + name = "Array Length"; + destroy_when_upgroup = true; + color = COLORS.node_blend_loop; + previewable = false; + + w = 96; + min_h = 80; + + outputs[| 0] = nodeValue("Length", self, JUNCTION_CONNECT.output, VALUE_TYPE.integer, 0); + + static update = function(frame = ANIMATOR.current_frame) { + if(!variable_struct_exists(group, "iterated")) return; + var val = group.inputs[| 0].getValue(); + outputs[| 0].setValue(array_length(val)); + } + + static onDrawNode = function(xx, yy, _mx, _my, _s) { + var bbox = drawGetBbox(xx, yy, _s); + draw_sprite_fit(s_node_iterator_amount, 0, bbox.xc, bbox.yc, bbox.w, bbox.h); + } +} \ No newline at end of file diff --git a/scripts/node_iterator_each_size/node_iterator_each_size.yy b/scripts/node_iterator_each_size/node_iterator_each_size.yy new file mode 100644 index 000000000..6fe1ae7d1 --- /dev/null +++ b/scripts/node_iterator_each_size/node_iterator_each_size.yy @@ -0,0 +1,11 @@ +{ + "resourceType": "GMScript", + "resourceVersion": "1.0", + "name": "node_iterator_each_size", + "isDnD": false, + "isCompatibility": false, + "parent": { + "name": "for each", + "path": "folders/nodes/data/iterate/for each.yy", + }, +} \ No newline at end of file diff --git a/scripts/node_iterator_input/node_iterator_input.gml b/scripts/node_iterator_input/node_iterator_input.gml index bc24301c8..d841ee4b5 100644 --- a/scripts/node_iterator_input/node_iterator_input.gml +++ b/scripts/node_iterator_input/node_iterator_input.gml @@ -1,5 +1,5 @@ function Node_Iterator_Input(_x, _y, _group = -1) : Node_Group_Input(_x, _y, _group) constructor { - name = "Input"; + name = "Loop Input"; color = COLORS.node_blend_loop; local_output = noone; diff --git a/scripts/node_iterator_length/node_iterator_length.gml b/scripts/node_iterator_length/node_iterator_length.gml new file mode 100644 index 000000000..7fccc96a0 --- /dev/null +++ b/scripts/node_iterator_length/node_iterator_length.gml @@ -0,0 +1,22 @@ +function Node_Iterator_Length(_x, _y, _group = -1) : Node(_x, _y, _group) constructor { + name = "Loop Amount"; + destroy_when_upgroup = true; + color = COLORS.node_blend_loop; + previewable = false; + + w = 96; + min_h = 80; + + outputs[| 0] = nodeValue("Length", self, JUNCTION_CONNECT.output, VALUE_TYPE.integer, 0); + + static update = function(frame = ANIMATOR.current_frame) { + if(!variable_struct_exists(group, "iterated")) return; + var val = group.inputs[| 0].getValue(); + outputs[| 0].setValue(val); + } + + static onDrawNode = function(xx, yy, _mx, _my, _s) { + var bbox = drawGetBbox(xx, yy, _s); + draw_sprite_fit(s_node_iterator_length, 0, bbox.xc, bbox.yc, bbox.w, bbox.h); + } +} \ No newline at end of file diff --git a/scripts/node_iterator_length/node_iterator_length.yy b/scripts/node_iterator_length/node_iterator_length.yy new file mode 100644 index 000000000..1ffb9126f --- /dev/null +++ b/scripts/node_iterator_length/node_iterator_length.yy @@ -0,0 +1,11 @@ +{ + "resourceType": "GMScript", + "resourceVersion": "1.0", + "name": "node_iterator_length", + "isDnD": false, + "isCompatibility": false, + "parent": { + "name": "for", + "path": "folders/nodes/data/iterate/for.yy", + }, +} \ No newline at end of file diff --git a/scripts/node_iterator_output/node_iterator_output.gml b/scripts/node_iterator_output/node_iterator_output.gml index 7bc19c0b1..fcafbd89a 100644 --- a/scripts/node_iterator_output/node_iterator_output.gml +++ b/scripts/node_iterator_output/node_iterator_output.gml @@ -1,6 +1,5 @@ - function Node_Iterator_Output(_x, _y, _group = -1) : Node_Group_Output(_x, _y, _group) constructor { - name = "Output"; + name = "Loop Output"; color = COLORS.node_blend_loop; w = 96; @@ -49,6 +48,7 @@ function Node_Iterator_Output(_x, _y, _group = -1) : Node_Group_Output(_x, _y, _ var _ot = outParent; for(var j = 0; j < ds_list_size(_ot.value_to); j++) { var _to = _ot.value_to[| j]; + if(!_to.node.renderActive) continue; if(_to.node.active && _to.value_from != noone && _to.value_from.node == group) { _to.node.triggerRender(); diff --git a/scripts/node_keyframe/node_keyframe.gml b/scripts/node_keyframe/node_keyframe.gml index 74d6ab6fe..8a9500566 100644 --- a/scripts/node_keyframe/node_keyframe.gml +++ b/scripts/node_keyframe/node_keyframe.gml @@ -286,7 +286,7 @@ function valueAnimator(_val, _prop) constructor { if(typeArray(prop.display_type) && is_array(val)) { var __v = ds_list_create(); for(var j = 0; j < array_length(val); j++) { - if(is_struct(val[j])) + if(is_struct(val[j]) && struct_has(val[j], "serialize")) ds_list_add_map(__v, val[j].serialize()); else ds_list_add(__v, val[j]); diff --git a/scripts/node_line/node_line.gml b/scripts/node_line/node_line.gml index ab92514f4..cb5a0020e 100644 --- a/scripts/node_line/node_line.gml +++ b/scripts/node_line/node_line.gml @@ -36,10 +36,15 @@ function Node_Line(_x, _y, _group = -1) : Node_Processor(_x, _y, _group) constru inputs[| 12] = nodeValue("Span width over path", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, false, "Apply the full 'width over length' to the trimmed path."); + inputs[| 13] = nodeValue("Round cap", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, false); + + inputs[| 14] = nodeValue("Round segment", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 4) + .setDisplay(VALUE_DISPLAY.slider, [2, 16, 1]); + input_display_list = [ ["Output", true], 0, 1, ["Line data", false], 6, 7, 2, - ["Line settings", false], 3, 11, 12, 8, 9, + ["Line settings", false], 3, 11, 12, 8, 9, 13, 14, ["Wiggle", false], 4, 5, ["Render", false], 10 ]; @@ -63,8 +68,17 @@ function Node_Line(_x, _y, _group = -1) : Node_Processor(_x, _y, _group) constru var _widc = _data[11]; var _widap = _data[12]; - var _rtStr = min(_ratio[0], _ratio[1]); - var _rtLen = max(_ratio[0], _ratio[1]) - _rtStr; + var _cap = _data[13]; + var _capP = _data[14]; + + inputs[| 14].setVisible(_cap); + + var _rangeMin = min(_ratio[0], _ratio[1]); + var _rangeMax = max(_ratio[0], _ratio[1]); + if(_rangeMax == 1) _rangeMax = 0.99999; + + var _rtStr = _rangeMin; + var _rtLen = _rangeMax - _rangeMin; var _use_path = _pat != noone && struct_has(_pat, "getPointRatio"); if(_ang < 0) _ang = 360 + _ang; @@ -80,20 +94,25 @@ function Node_Line(_x, _y, _group = -1) : Node_Processor(_x, _y, _group) constru if(_bg) draw_clear_alpha(0, 1); else draw_clear_alpha(0, 0); - var _ox, _nx, _oy, _ny, _ow, _nw, _oa, _na; + var _ox, _nx, _oy, _ny, _ow, _nw, _oa, _na, _oc, _nc; if(_use_path) { var ww = _rtLen / _seg; - var _total = _rtLen; - var _prog_curr = frac(_shift + _rtStr) - ww; - var _prog = _prog_curr + 1; - var _prog_eli = 0; + var _total = _rtLen; + var _total_prev = _total; + var _freeze = 0; + var _prog_curr = frac(_shift + _rtStr) - ww; + var _prog = _prog_curr + 1; + var _prog_eli = 0; + var step = 0; while(_total > 0) { - if(_prog_curr >= 1) _prog_curr = 0; - else _prog_curr = min(_prog_curr + min(_total, ww), 1); - _prog_eli += min(_total, ww); + if(_prog_curr >= 1) + _prog_curr = frac(_prog_curr); + else + _prog_curr = min(_prog_curr + min(_total, ww), 1); + _prog_eli = _prog_eli + min(_total, ww); var p = _pat.getPointRatio(_prog_curr); _nx = p[0]; @@ -109,26 +128,32 @@ function Node_Line(_x, _y, _group = -1) : Node_Processor(_x, _y, _group) constru } _nw = random_range(_wid[0], _wid[1]); - _nw *= eval_curve_x(_widc, _widap? _prog_curr / _rtLen : _prog_curr); + _nw *= eval_curve_x(_widc, _widap? _prog_eli / _rtLen : _prog_curr); if(_total <= _prog_curr - _prog) { _na = point_direction(_ox, _oy, _nx, _ny) + 90; } else { - var np = _pat.getPointRatio(_prog_curr + ww); - var _nna = point_direction(_nx, _ny, np[0], np[1]) + 90; - - if(_total == _rtLen) - _na = _nna; - else { - var _da = point_direction(_ox, _oy, _nx, _ny) + 90; - _na = _da + angle_difference(_nna, _da) / 2; - } + var n0 = _pat.getPointRatio(_prog_curr - 0.001); + var n1 = _pat.getPointRatio(_prog_curr + 0.001); + _na = point_direction(n0[0], n0[1], n1[0], n1[1]) + 90; } + _nc = gradient_eval(_color, _prog_eli / _rtLen, ds_list_get(_col_data, 0)); + if(_prog_curr > _prog) { - draw_set_color(gradient_eval(_color, _prog_eli / _rtLen, ds_list_get(_col_data, 0))); - draw_line_width2_angle(_ox, _oy, _nx, _ny, _ow, _nw, _oa, _na); - _total -= (_prog_curr - _prog); + if(_cap) { + if(_total == _rtLen) { + draw_set_color(_oc); + draw_circle_angle(_ox, _oy, _ow / 2, _oa, _oa + 180, _capP); + } + if(_total - (_prog_curr - _prog) <= 0) { + draw_set_color(_nc); + draw_circle_angle(_nx, _ny, _nw / 2, _na - 180, _na, _capP); + } + } + + draw_line_width2_angle(_ox, _oy, _nx, _ny, _ow, _nw, _oa, _na, _oc, _nc); + _total -= _prog_curr - _prog; } _prog = _prog_curr; @@ -136,6 +161,10 @@ function Node_Line(_x, _y, _group = -1) : Node_Processor(_x, _y, _group) constru _ox = _nx; _oy = _ny; _ow = _nw; + _oc = _nc; + + if(_total_prev == _total && ++_freeze > 16) break; + _total_prev = _total; } } else { var x0, y0, x1, y1; @@ -150,10 +179,10 @@ function Node_Line(_x, _y, _group = -1) : Node_Processor(_x, _y, _group) constru var _d = point_direction(x0, y0, x1, y1); var ww = _rtLen / _seg; - var _total = _rtLen; - var _prog_curr = frac(_shift + _rtStr) - ww; - var _prog = _prog_curr + 1; - var _prog_eli = 0; + var _total = _rtLen; + var _prog_curr = frac(_shift + _rtStr) - ww; + var _prog = _prog_curr + 1; + var _prog_eli = 0; while(_total > 0) { if(_prog_curr >= 1) _prog_curr = 0; @@ -170,11 +199,23 @@ function Node_Line(_x, _y, _group = -1) : Node_Processor(_x, _y, _group) constru _sedIndex++; _nw = random_range(_wid[0], _wid[1]); - _nw *= eval_curve_x(_widc, _prog_curr); + _nw *= eval_curve_x(_widc, _widap? _prog_eli / _rtLen : _prog_curr); + + _nc = gradient_eval(_color, _prog_eli / _rtLen, ds_list_get(_col_data, 0)); if(_prog_curr > _prog) { - draw_set_color(gradient_eval(_color, _prog_eli / _rtLen, ds_list_get(_col_data, 0))); - draw_line_width2_angle(_ox, _oy, _nx, _ny, _ow, _nw, _d + 90, _d + 90); + if(_cap) { + if(_total == _rtLen){ + draw_set_color(_oc); + draw_circle_angle(_ox, _oy, _ow / 2, _d + 180 - 90, _d + 180 + 90, _capP); + } + if(_total - (_prog_curr - _prog) <= 0){ + draw_set_color(_nc); + draw_circle_angle(_nx, _ny, _nw / 2, _d - 90, _d + 90, _capP); + } + } + + draw_line_width2_angle(_ox, _oy, _nx, _ny, _ow, _nw, _d + 90, _d + 90, _oc, _nc); _total -= (_prog_curr - _prog); } @@ -182,6 +223,7 @@ function Node_Line(_x, _y, _group = -1) : Node_Processor(_x, _y, _group) constru _ox = _nx; _oy = _ny; _ow = _nw; + _oc = _nc; } } surface_reset_target(); diff --git a/scripts/node_lua_compute/node_lua_compute.gml b/scripts/node_lua_compute/node_lua_compute.gml index a002298e5..64b0666c9 100644 --- a/scripts/node_lua_compute/node_lua_compute.gml +++ b/scripts/node_lua_compute/node_lua_compute.gml @@ -6,7 +6,8 @@ function Node_Lua_Compute(_x, _y, _group = -1) : Node(_x, _y, _group) constructo inputs[| 1] = nodeValue("Return type", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0) .setDisplay(VALUE_DISPLAY.enum_scroll, [ "Number", "String" ]); - + inputs[| 1].editWidget.update_hover = false; + inputs[| 2] = nodeValue("Lua code", self, JUNCTION_CONNECT.input, VALUE_TYPE.text, "", o_dialog_lua_reference) .setDisplay(VALUE_DISPLAY.code); @@ -20,6 +21,7 @@ function Node_Lua_Compute(_x, _y, _group = -1) : Node(_x, _y, _group) constructo inputs[| index + 1] = nodeValue("Argument type", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0 ) .setDisplay(VALUE_DISPLAY.enum_scroll, [ "Number", "String", "Surface" ]); inputs[| index + 1].editWidget.interactable = false; + inputs[| index + 1].editWidget.update_hover = false; inputs[| index + 2] = nodeValue("Argument value", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0 ) .setVisible(true, true); diff --git a/scripts/node_lua_surface/node_lua_surface.gml b/scripts/node_lua_surface/node_lua_surface.gml index fe04063d0..3fb4fbe39 100644 --- a/scripts/node_lua_surface/node_lua_surface.gml +++ b/scripts/node_lua_surface/node_lua_surface.gml @@ -20,6 +20,7 @@ function Node_Lua_Surface(_x, _y, _group = -1) : Node(_x, _y, _group) constructo inputs[| index + 1] = nodeValue("Argument type", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0 ) .setDisplay(VALUE_DISPLAY.enum_scroll, [ "Number", "String", "Surface" ]); inputs[| index + 1].editWidget.interactable = false; + inputs[| index + 1].editWidget.update_hover = false; inputs[| index + 2] = nodeValue("Argument value", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0 ) .setVisible(true, true); diff --git a/scripts/node_noise_grid/node_noise_grid.gml b/scripts/node_noise_grid/node_noise_grid.gml index c974bc0ff..ba6121d54 100644 --- a/scripts/node_noise_grid/node_noise_grid.gml +++ b/scripts/node_noise_grid/node_noise_grid.gml @@ -24,7 +24,7 @@ function Node_Grid_Noise(_x, _y, _group = -1) : Node_Processor(_x, _y, _group) c inputs[| 3] = nodeValue("Seed", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0); inputs[| 4] = nodeValue("Shift", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0) - .setDisplay(VALUE_DISPLAY.slider, [-2, 2, 0.01]); + .setDisplay(VALUE_DISPLAY.slider, [-0.5, 0.5, 0.01]); inputs[| 5] = nodeValue("Texture sample", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, 0); diff --git a/scripts/node_particle/node_particle.gml b/scripts/node_particle/node_particle.gml index 921f0368c..fea8ce5e1 100644 --- a/scripts/node_particle/node_particle.gml +++ b/scripts/node_particle/node_particle.gml @@ -32,18 +32,12 @@ function Node_Particle(_x, _y, _group = -1) : Node_VFX_Spawner_Base(_x, _y, _gro static onStep = function() { if(!ANIMATOR.frame_progress) return; - if(recoverCache()) { - triggerRender(); - return; - } - RETURN_ON_REST - if(ANIMATOR.current_frame == 0) { + if(ANIMATOR.current_frame == 0) reset(); - runVFX(ANIMATOR.current_frame); - } else if(cached_output[ANIMATOR.current_frame - 1] != 0) - runVFX(ANIMATOR.current_frame); + + runVFX(ANIMATOR.current_frame); } function render(_time = ANIMATOR.current_frame) { @@ -67,9 +61,8 @@ function Node_Particle(_x, _y, _group = -1) : Node_VFX_Spawner_Base(_x, _y, _gro var surf_w = surface_get_width(_outSurf); var surf_h = surface_get_height(_outSurf); - for(var i = 0; i < PREF_MAP[? "part_max_amount"]; i++) { + for(var i = 0; i < PREF_MAP[? "part_max_amount"]; i++) parts[i].draw(_exact, surf_w, surf_h); - } BLEND_NORMAL; surface_reset_target(); diff --git a/scripts/node_path/node_path.gml b/scripts/node_path/node_path.gml index cbc474d50..f7a7c6f37 100644 --- a/scripts/node_path/node_path.gml +++ b/scripts/node_path/node_path.gml @@ -44,6 +44,7 @@ function Node_Path(_x, _y, _group = -1) : Node(_x, _y, _group) constructor { [ "Circle path", THEME.path_tools_circle ], ]; + anchors = []; lengths = []; length_total = 0; @@ -404,6 +405,7 @@ function Node_Path(_x, _y, _group = -1) : Node(_x, _y, _group) constructor { var ansize = ds_list_size(inputs) - input_fix_len; if(ansize < 2) { lengths = []; + anchors = []; return; } var sample = PREF_MAP[? "path_resolution"]; @@ -411,6 +413,7 @@ function Node_Path(_x, _y, _group = -1) : Node(_x, _y, _group) constructor { var con = loop? ansize : ansize - 1; if(array_length(lengths) != con) array_resize(lengths, con); + array_resize(anchors, ansize); for(var i = 0; i < con; i++) { var index_0 = input_fix_len + i; @@ -419,6 +422,8 @@ function Node_Path(_x, _y, _group = -1) : Node(_x, _y, _group) constructor { var _a0 = inputs[| index_0].getValue(); var _a1 = inputs[| index_1].getValue(); + anchors[i] = _a0; + anchors[i + 1] = _a1; var l = 0; @@ -483,17 +488,19 @@ function Node_Path(_x, _y, _group = -1) : Node(_x, _y, _group) constructor { var _a0, _a1; for(var i = 0; i < ansize; i++) { - _a0 = inputs[| input_fix_len + i].getValue(); - _a1 = inputs[| input_fix_len + safe_mod(i + 1, amo)].getValue(); + _a0 = anchors[i]; + _a1 = anchors[safe_mod(i + 1, amo)]; - if(pix <= lengths[i]) { - var _t = pix / lengths[i]; - - if(!is_array(_a0) || !is_array(_a1)) - return [0, 0]; - return eval_bezier(_t, _a0[0], _a0[1], _a1[0], _a1[1], _a0[0] + _a0[4], _a0[1] + _a0[5], _a1[0] + _a1[2], _a1[1] + _a1[3]); + if(pix > lengths[i]) { + pix -= lengths[i]; + continue; } - pix -= lengths[i]; + + var _t = pix / lengths[i]; + + if(!is_array(_a0) || !is_array(_a1)) + return [0, 0]; + return eval_bezier(_t, _a0[0], _a0[1], _a1[0], _a1[1], _a0[0] + _a0[4], _a0[1] + _a0[5], _a1[0] + _a1[2], _a1[1] + _a1[3]); } return [0, 0]; diff --git a/scripts/node_polygonal_shape/node_gradient.yy b/scripts/node_polygonal_shape/node_gradient.yy new file mode 100644 index 000000000..fa813bb58 --- /dev/null +++ b/scripts/node_polygonal_shape/node_gradient.yy @@ -0,0 +1,12 @@ +{ + "isDnD": false, + "isCompatibility": false, + "parent": { + "name": "generator", + "path": "folders/nodes/data/generator.yy", + }, + "resourceVersion": "1.0", + "name": "node_gradient", + "tags": [], + "resourceType": "GMScript", +} \ No newline at end of file diff --git a/scripts/node_polygonal_shape/node_perlin.yy b/scripts/node_polygonal_shape/node_perlin.yy new file mode 100644 index 000000000..c2db638a3 --- /dev/null +++ b/scripts/node_polygonal_shape/node_perlin.yy @@ -0,0 +1,12 @@ +{ + "isDnD": false, + "isCompatibility": false, + "parent": { + "name": "generator", + "path": "folders/nodes/data/generator.yy", + }, + "resourceVersion": "1.0", + "name": "node_perlin", + "tags": [], + "resourceType": "GMScript", +} \ No newline at end of file diff --git a/scripts/node_polygonal_shape/node_polygonal_shape.gml b/scripts/node_polygonal_shape/node_polygonal_shape.gml new file mode 100644 index 000000000..16a38aba4 --- /dev/null +++ b/scripts/node_polygonal_shape/node_polygonal_shape.gml @@ -0,0 +1,162 @@ +function Node_Shape_Polygon(_x, _y, _group = -1) : Node_Processor(_x, _y, _group) constructor { + name = "Polygon Shape"; + + shapesArray = [ "Rectangle", "Ellipse", "Star", "Capsule", "Ring", "Arc", "Gear", "Cross" ]; + + inputs[| 0] = nodeValue("Dimension", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, def_surf_size2 ) + .setDisplay(VALUE_DISPLAY.vector); + + inputs[| 1] = nodeValue("Backgroud", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, false); + + inputs[| 2] = nodeValue("Backgroud color", self, JUNCTION_CONNECT.input, VALUE_TYPE.color, c_black); + + inputs[| 3] = nodeValue("Shape color", self, JUNCTION_CONNECT.input, VALUE_TYPE.color, c_white); + + inputs[| 4] = nodeValue("Shape", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0) + .setDisplay(VALUE_DISPLAY.enum_scroll, shapesArray); + + inputs[| 5] = nodeValue("Position", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 0.5, 0.5 ]) + .setDisplay(VALUE_DISPLAY.vector) + .setUnitRef(function(index) { return getDimension(index); }, VALUE_UNIT.reference); + + inputs[| 6] = nodeValue("Rotation", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0) + .setDisplay(VALUE_DISPLAY.rotation); + + inputs[| 7] = nodeValue("Scale", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, [ 0.5, 0.5 ]) + .setDisplay(VALUE_DISPLAY.vector) + .setUnitRef(function(index) { return getDimension(index); }, VALUE_UNIT.reference); + + inputs[| 8] = nodeValue("Sides", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 32) + .setDisplay(VALUE_DISPLAY.slider, [2, 64, 1]); + + inputs[| 9] = nodeValue("Inner radius", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0.5) + .setDisplay(VALUE_DISPLAY.slider, [0, 1, 0.01]); + + inputs[| 10] = nodeValue("Radius", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0.5) + .setDisplay(VALUE_DISPLAY.slider, [0, 1, 0.01]); + + inputs[| 11] = nodeValue("Teeth", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 6) + .setDisplay(VALUE_DISPLAY.slider, [3, 16, 1]); + + inputs[| 12] = nodeValue("Teeth height", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0.2) + .setDisplay(VALUE_DISPLAY.slider, [0, 1, 0.01]); + + inputs[| 13] = nodeValue("Teeth taper", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0) + .setDisplay(VALUE_DISPLAY.slider, [-0.5, 0.5, 0.01]); + + inputs[| 14] = nodeValue("Angle range", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 0, 360 ]) + .setDisplay(VALUE_DISPLAY.rotation_range); + + inputs[| 15] = nodeValue("Round cap", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, false); + + outputs[| 0] = nodeValue("Surface out", self, JUNCTION_CONNECT.output, VALUE_TYPE.surface, noone); + + input_display_list = [ + ["Surface", false], 0, + ["Transform", false], 5, 6, 7, + ["Shape", false], 4, 8, 9, 10, 11, 12, 13, 14, 15, + ["Render", true], 1, 2, 3, + ]; + + node_draw_transform_init(); + + static drawOverlay = function(active, _x, _y, _s, _mx, _my, _snx, _sny) { + if(array_length(current_data) != ds_list_size(inputs)) return; + if(process_amount > 1) return; + + node_draw_transform_box(active, _x, _y, _s, _mx, _my, _snx, _sny, 5, 6, 7); + } + + static draw_vertex_transform = function(_x, _y, _pos, _rot) { + var p = point_rotate(_x, _y, 0, 0, _rot); + draw_vertex(p[0] + _pos[0], p[1] + _pos[1]); + } + + static process_data = function(_outSurf, _data, _output_index, _array_index) { + var _dim = _data[0]; + var _bg = _data[1]; + var _bgc = _data[2]; + var _shc = _data[3]; + var _shp = _data[4]; + var _pos = _data[5]; + var _rot = _data[6]; + var _sca = _data[7]; + var _side = _data[8]; + var _inner = _data[9]; + var _rad = _data[10]; + var _teeth = _data[11]; + var _thHei = _data[12]; + var _thTap = _data[13]; + var _aRan = _data[14]; + var _cap = _data[15]; + + inputs[| 8].setVisible(_shp == 1 || _shp == 2 || _shp == 3 || _shp == 4 || _shp == 5); + inputs[| 9].setVisible(_shp == 2 || _shp == 4 || _shp == 5 || _shp == 6 || _shp == 7); + inputs[| 10].setVisible(_shp == 3); + inputs[| 11].setVisible(_shp == 6); + inputs[| 12].setVisible(_shp == 6); + inputs[| 13].setVisible(_shp == 6); + inputs[| 14].setVisible(_shp == 5); + inputs[| 15].setVisible(_shp == 5); + + _outSurf = surface_verify(_outSurf, _dim[0], _dim[1]); + + var data = { + side: _side, + inner: _inner, + radius: _rad, + radRan: _aRan, + teeth: _teeth, + teethH: _thHei, + teethT: _thTap, + cap: _cap, + }; + + surface_set_target(_outSurf); + if(_bg) draw_clear_alpha(_bgc, 1); + else draw_clear_alpha(0, 0); + + draw_set_color(_shc); + draw_primitive_begin(pr_trianglelist); + var points = []; + + switch(array_safe_get(shapesArray, _shp)) { + case "Rectangle" : points = SHAPE_rectangle(_sca); break; + case "Ellipse" : points = SHAPE_circle(_sca, data); break; + case "Star" : points = SHAPE_star(_sca, data); break; + case "Capsule" : points = SHAPE_capsule(_sca, data); break; + case "Ring" : points = SHAPE_ring(_sca, data); break; + case "Arc" : points = SHAPE_arc(_sca, data); break; + case "Gear" : points = SHAPE_gear(_sca, data); break; + case "Cross" : points = SHAPE_cross(_sca, data); break; + } + + var shapes = []; + for( var i = 0; i < array_length(points); i++ ) { + if(points[i].type == SHAPE_TYPE.points) + shapes[i] = polygon_triangulate(points[i].points); + else if(points[i].type == SHAPE_TYPE.triangles) + shapes[i] = points[i].triangles; + } + + for( var i = 0; i < array_length(shapes); i++ ) { + var triangles = shapes[i]; + + for( var j = 0; j < array_length(triangles); j++ ) { + var tri = triangles[j]; + var p0 = tri[0]; + var p1 = tri[1]; + var p2 = tri[2]; + + draw_vertex_transform(p0[0], p0[1], _pos, _rot); + draw_vertex_transform(p1[0], p1[1], _pos, _rot); + draw_vertex_transform(p2[0], p2[1], _pos, _rot); + } + } + draw_primitive_end(); + + surface_reset_target(); + + return _outSurf; + } +} \ No newline at end of file diff --git a/scripts/node_polygonal_shape/node_polygonal_shape.yy b/scripts/node_polygonal_shape/node_polygonal_shape.yy new file mode 100644 index 000000000..8b96fe813 --- /dev/null +++ b/scripts/node_polygonal_shape/node_polygonal_shape.yy @@ -0,0 +1,11 @@ +{ + "resourceType": "GMScript", + "resourceVersion": "1.0", + "name": "node_polygonal_shape", + "isDnD": false, + "isCompatibility": false, + "parent": { + "name": "generator", + "path": "folders/nodes/data/generator.yy", + }, +} \ No newline at end of file diff --git a/scripts/node_registry/node_registry.gml b/scripts/node_registry/node_registry.gml index 05ae51ec8..5f17332f9 100644 --- a/scripts/node_registry/node_registry.gml +++ b/scripts/node_registry/node_registry.gml @@ -67,7 +67,8 @@ function NodeObject(_name, _spr, _node, _create, tags = []) constructor { addNodeObject(iter, "Output", s_node_loop_output, "Node_Iterator_Output", [1, Node_Iterator_Output]); ds_list_add(iter, "Loops"); - addNodeObject(iter, "Index", s_node_iterator_index, "Node_Iterator_Index", [1, Node_Iterator_Index]); + addNodeObject(iter, "Index", s_node_iterator_index, "Node_Iterator_Index", [1, Node_Iterator_Index]); + addNodeObject(iter, "Loop amount", s_node_iterator_amount, "Node_Iterator_Length", [1, Node_Iterator_Length]); var itere = ds_list_create(); addNodeCatagory("Loop", itere, ["Node_Iterate_Each"]); @@ -76,7 +77,8 @@ function NodeObject(_name, _spr, _node, _create, tags = []) constructor { addNodeObject(itere, "Output", s_node_group_output, "Node_Group_Output", [1, Node_Group_Output]); ds_list_add(itere, "Loops"); - addNodeObject(itere, "Index", s_node_iterator_index, "Node_Iterator_Index", [1, Node_Iterator_Index]); + addNodeObject(itere, "Index", s_node_iterator_index, "Node_Iterator_Index", [1, Node_Iterator_Index]); + addNodeObject(itere, "Array Length", s_node_iterator_length, "Node_Iterator_Each_Length", [1, Node_Iterator_Each_Length]); var feed = ds_list_create(); addNodeCatagory("Feedback", feed, ["Node_Feedback"]); @@ -219,7 +221,7 @@ function NodeObject(_name, _spr, _node, _create, tags = []) constructor { addNodeObject(filter, "Glow", s_node_glow, "Node_Glow", [1, Node_Glow]); addNodeObject(filter, "Shadow", s_node_shadow, "Node_Shadow", [1, Node_Shadow]); addNodeObject(filter, "Bloom", s_node_bloom, "Node_Bloom", [1, Node_Bloom]); - //addNodeObject(filter, "Trail", s_node_trail, "Node_Trail", [1, Node_Trail]); + addNodeObject(filter, "Trail", s_node_trail, "Node_Trail", [1, Node_Trail]); addNodeObject(filter, "Erode", s_node_erode, "Node_Erode", [1, Node_Erode]); addNodeObject(filter, "Corner", s_node_corner, "Node_Corner", [1, Node_Corner], ["round corner"]).set_version(1110); addNodeObject(filter, "2D Light", s_node_2d_light, "Node_2D_light", [1, Node_2D_light]); @@ -289,9 +291,10 @@ function NodeObject(_name, _spr, _node, _create, tags = []) constructor { addNodeObject(generator, "4 Points Gradient", s_node_gradient_4points, "Node_Gradient_Points", [1, Node_Gradient_Points]); ds_list_add(generator, "Drawer"); - addNodeObject(generator, "Line", s_node_line, "Node_Line", [1, Node_Line]); - addNodeObject(generator, "Draw Text", s_node_text_render, "Node_Text", [1, Node_Text]); - addNodeObject(generator, "Shape", s_node_shape, "Node_Shape", [1, Node_Shape]); + addNodeObject(generator, "Line", s_node_line, "Node_Line", [1, Node_Line]); + addNodeObject(generator, "Draw Text", s_node_text_render, "Node_Text", [1, Node_Text]); + addNodeObject(generator, "Shape", s_node_shape, "Node_Shape", [1, Node_Shape]); + addNodeObject(generator, "Polygon Shape", s_node_shape, "Node_Shape_Polygon", [1, Node_Shape_Polygon]).set_version(1130); ds_list_add(generator, "Noises"); addNodeObject(generator, "Noise", s_node_noise, "Node_Noise", [1, Node_Noise]); @@ -337,8 +340,9 @@ function NodeObject(_name, _spr, _node, _create, tags = []) constructor { var renderNode = ds_list_create(); addNodeCatagory("Render", renderNode); ds_list_add(renderNode, "Renders"); - addNodeObject(renderNode, "Render Spritesheet", s_node_sprite_sheet, "Node_Render_Sprite_Sheet", [1, Node_Render_Sprite_Sheet]); - if(!DEMO) addNodeObject(renderNode, "Export", s_node_export, "Node_Export", [0, Node_create_Export]); + addNodeObject(renderNode, "Render Spritesheet", s_node_sprite_sheet, "Node_Render_Sprite_Sheet", [1, Node_Render_Sprite_Sheet]); + addNodeObject(renderNode, "Cache Array", s_node_cache_array, "Node_Cache_Array", [1, Node_Cache_Array]).set_version(1130); + if(!DEMO) addNodeObject(renderNode, "Export", s_node_export, "Node_Export", [0, Node_create_Export]); //addNodeObject(renderNode, "Preview timeline", s_node_timeline_preview,"Node_Timeline_Preview", [1, Node_create_Timeline_Preview]); var values = ds_list_create(); diff --git a/scripts/node_stack/node_stack.gml b/scripts/node_stack/node_stack.gml index a7ff74a23..2405606f0 100644 --- a/scripts/node_stack/node_stack.gml +++ b/scripts/node_stack/node_stack.gml @@ -92,7 +92,7 @@ function Node_Stack(_x, _y, _group = -1) : Node(_x, _y, _group) constructor { surface_set_target(_outSurf); draw_clear_alpha(0, 0); - //BLEND_OVERRIDE; + BLEND_ALPHA; var sx = 0, sy = 0; for( var i = input_fix_len; i < ds_list_size(inputs) - 1; i++ ) { diff --git a/scripts/node_trail/node_trail.gml b/scripts/node_trail/node_trail.gml index db7f017e2..87800ab80 100644 --- a/scripts/node_trail/node_trail.gml +++ b/scripts/node_trail/node_trail.gml @@ -1,73 +1,71 @@ -function Node_Trail(_x, _y, _group = -1) : Node_Processor(_x, _y, _group) constructor { +function Node_Trail(_x, _y, _group = -1) : Node(_x, _y, _group) constructor { name = "Trail"; use_cache = true; inputs[| 0] = nodeValue("Surface in", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, 0); - inputs[| 1] = nodeValue("Max life", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 3); - inputs[| 2] = nodeValue("Step", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 1); - inputs[| 3] = nodeValue("Alpha decrease", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0) - .setDisplay(VALUE_DISPLAY.slider, [0, 1, 0.01]); + inputs[| 1] = nodeValue("Max life", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 5); + inputs[| 2] = nodeValue("Alpha fade", self, JUNCTION_CONNECT.input, VALUE_TYPE.curve, CURVE_DEF_11); - inputs[| 4] = nodeValue("Blend mode", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0) + inputs[| 3] = nodeValue("Blend mode", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0) .setDisplay(VALUE_DISPLAY.enum_scroll, BLEND_TYPES ); outputs[| 0] = nodeValue("Surface out", self, JUNCTION_CONNECT.output, VALUE_TYPE.surface, noone); input_display_list = [ - ["Trail settings", false], 0, 1, 2, 4, 3 + ["Surface", true], 0, + ["Trail settings", false], 1, 3, 2 ]; temp_surf = [ surface_create(1, 1), surface_create(1, 1) ]; - static process_data = function(_outSurf, _data, _output_index, _array_index) { - if(!inputs[| 0].value_from) - return _outSurf; - if(array_length(cached_output) != ANIMATOR.frames_total + 1) - return _outSurf + static update = function() { + if(!inputs[| 0].value_from) return; + if(array_length(cached_output) != ANIMATOR.frames_total + 1) return; + + var _surf = inputs[| 0].getValue(); + var _life = inputs[| 1].getValue(); + var _alpha = inputs[| 2].getValue(); + var _blend = inputs[| 3].getValue(); + + if(!is_surface(_surf)) return; + cacheCurrentFrame(_surf); for(var i = 0; i < 2; i++) { - temp_surf[i] = surface_verify(temp_surf[i], surface_get_width(_outSurf), surface_get_height(_outSurf)); + temp_surf[i] = surface_verify(temp_surf[i], surface_get_width(_surf), surface_get_height(_surf)); surface_set_target(temp_surf[i]); draw_clear_alpha(0, 0); surface_reset_target(); } - var _life = _data[1]; - var _step = _data[2]; - var _alpha = _data[3]; - var _blend = _data[4]; + var _outSurf = outputs[| 0].getValue(); + _outSurf = surface_verify(_outSurf, surface_get_width(_surf), surface_get_height(_surf)); + outputs[| 0].setValue(_outSurf); + var curf = ANIMATOR.current_frame; var aa = 1; - var res_index = 0; - var frame_amo = min(_life, floor(ANIMATOR.current_frame / _step)); - var st_frame = ANIMATOR.current_frame - frame_amo * _step; + var frame_amo = min(_life, curf); + var st_frame = curf - frame_amo; + var bg = 0; - for(var i = 0; i <= _life; i++) { - var frame_idx = clamp(st_frame + i * _step, 0, ANIMATOR.frames_total - 1); - var bg = i % 2; - var fg = !bg; - var aa = 1 - _alpha * (_life - i); + for(var i = 0; i <= frame_amo; i++) { + var frame_idx = st_frame + i; + var prog = (frame_idx - (curf - _life)) / _life; + var aa = eval_curve_x(_alpha, prog); + aa = power(aa, 2); + + bg = !bg; surface_set_target(temp_surf[bg]); - if(i == _life) - draw_surface_safe(_data[0], 0, 0); - else if(is_surface(cached_output[frame_idx])) - draw_surface_blend(temp_surf[fg], cached_output[frame_idx], _blend, aa); + draw_surface_blend(temp_surf[!bg], getCacheFrame(frame_idx), _blend, aa, false); surface_reset_target(); - - res_index = bg; } surface_set_target(_outSurf); draw_clear_alpha(0, 0); BLEND_OVERRIDE; - draw_surface_safe(temp_surf[res_index], 0, 0); + draw_surface_safe(temp_surf[bg], 0, 0); BLEND_NORMAL; surface_reset_target(); - - cacheCurrentFrame(_data[0]); - - return _outSurf; } } \ No newline at end of file diff --git a/scripts/panel_collection/panel_collection.gml b/scripts/panel_collection/panel_collection.gml index cf0a2157c..03f47245b 100644 --- a/scripts/panel_collection/panel_collection.gml +++ b/scripts/panel_collection/panel_collection.gml @@ -55,7 +55,12 @@ function Panel_Collection() : PanelContent() constructor { refreshContext(); }) ]; - } else if(STEAM_ENABLED) { + + if(STEAM_ENABLED) + array_push(contentMenu, -1); + } + + if(STEAM_ENABLED) { if(!meta.steam) { array_push(contentMenu, menuItem(get_text("panel_collection_workshop_upload", "Upload to Steam Workshop") + "...", function() { var dia = dialogCall(o_dialog_file_name_collection, mouse_mx + ui(8), mouse_my + ui(-320)); diff --git a/scripts/panel_graph/panel_graph.gml b/scripts/panel_graph/panel_graph.gml index cee7d96b4..496c06412 100644 --- a/scripts/panel_graph/panel_graph.gml +++ b/scripts/panel_graph/panel_graph.gml @@ -178,6 +178,7 @@ function Panel_Graph() : PanelContent() constructor { addHotkey("Graph", "Toggle grid", "G", MOD_KEY.none, function() { show_grid = !show_grid; }); addHotkey("Graph", "Toggle preview", "H", MOD_KEY.none, function() { setTriggerPreview(); }); + addHotkey("Graph", "Toggle render", "R", MOD_KEY.none, function() { setTriggerRender(); }); if(!DEMO) addHotkey("Graph", "Export", "E", MOD_KEY.ctrl, function() { setCurrentExport(); }); @@ -449,6 +450,10 @@ function Panel_Graph() : PanelContent() constructor { menuItem(get_text("panel_graph_toggle_preview", "Toggle node preview"), function() { setTriggerPreview(); }, noone, ["Graph", "Toggle preview"])); + array_push(menu, + menuItem(get_text("panel_graph_toggle_render", "Toggle node render"), function() { + setTriggerRender(); + }, noone, ["Graph", "Toggle render"])); array_push(menu, menuItem(get_text("panel_graph_delete_and_merge_connection", "Delete and merge connection"), function() { @@ -524,6 +529,7 @@ function Panel_Graph() : PanelContent() constructor { for(var i = 0; i < ds_list_size(nodes_select_list); i++) { var _node = nodes_select_list[| i]; + if(!_node) continue; _node.drawActive(gr_x, gr_y, graph_s); } //print("Draw active: " + string(current_time - t)); t = current_time; @@ -1030,6 +1036,17 @@ function Panel_Graph() : PanelContent() constructor { } } + function setTriggerRender() { + if(node_focus != noone) + node_focus.renderActive = !node_focus.renderActive; + + var show = false; + for(var i = 0; i < ds_list_size(nodes_select_list); i++) { + if(i == 0) show = !nodes_select_list[| i].renderActive; + nodes_select_list[| i].renderActive = show; + } + } + function setCurrentCanvasBlend(_node = node_focus) { if(!_node) return; diff --git a/scripts/render_data/render_data.gml b/scripts/render_data/render_data.gml index fa5af0e37..388003074 100644 --- a/scripts/render_data/render_data.gml +++ b/scripts/render_data/render_data.gml @@ -4,13 +4,14 @@ enum RENDER_TYPE { full = 2 } -global.RENDER_LOG = true; +global.RENDER_LOG = false; global.group_inputs = [ "Node_Group_Input", "Node_Feedback_Input", "Node_Iterator_Input", "Node_Iterator_Each_Input" ]; function __nodeLeafList(_list, _queue) { for( var i = 0; i < ds_list_size(_list); i++ ) { var _node = _list[| i]; if(!_node.active) continue; + if(!_node.renderActive) continue; var _startNode = _node.isRenderable(true); if(_startNode) { @@ -70,6 +71,7 @@ function Render(partial = false) { if(array_exists(global.group_inputs, instanceof(_node))) continue; if(!_node.active) continue; + if(!_node.renderActive) continue; if(_node.rendered) continue; if(__nodeInLoop(_node)) continue; diff --git a/scripts/scrollBox/scrollBox.gml b/scripts/scrollBox/scrollBox.gml index 8ba346038..ffd98c400 100644 --- a/scripts/scrollBox/scrollBox.gml +++ b/scripts/scrollBox/scrollBox.gml @@ -10,6 +10,7 @@ function scrollBox(_data, _onModify) : widget() constructor { align = fa_center; extra_button = noone; + update_hover = true; static trigger = function() { if(is_method(data_list)) data = data_list(); @@ -23,6 +24,7 @@ function scrollBox(_data, _onModify) : widget() constructor { initVal = ind; dialog_w = other.w; align = other.align; + update_hover = other.update_hover; } } diff --git a/scripts/surface_functions/surface_functions.gml b/scripts/surface_functions/surface_functions.gml index 8b0dfb4e4..ea6429021 100644 --- a/scripts/surface_functions/surface_functions.gml +++ b/scripts/surface_functions/surface_functions.gml @@ -121,10 +121,7 @@ function surface_copy_from(dst, src) { function surface_clone(surface, source = noone) { if(!is_surface(surface)) return noone; - if(source == noone) - source = surface_create_valid(surface_get_width(surface), surface_get_height(surface)); - else - source = surface_verify(source, surface_get_width(surface), surface_get_height(surface)); + source = surface_verify(source, surface_get_width(surface), surface_get_height(surface)); surface_set_target(source); draw_clear_alpha(0, 0); diff --git a/shaders/sh_blend_replace/sh_blend_add.yy b/shaders/sh_blend_replace/sh_blend_add.yy new file mode 100644 index 000000000..63fc46ff6 --- /dev/null +++ b/shaders/sh_blend_replace/sh_blend_add.yy @@ -0,0 +1,11 @@ +{ + "type": 1, + "parent": { + "name": "blend", + "path": "folders/shader/blend.yy", + }, + "resourceVersion": "1.0", + "name": "sh_blend_add", + "tags": [], + "resourceType": "GMShader", +} \ No newline at end of file diff --git a/shaders/sh_blend_replace/sh_blend_add_alpha_adj.yy b/shaders/sh_blend_replace/sh_blend_add_alpha_adj.yy new file mode 100644 index 000000000..62f8a363d --- /dev/null +++ b/shaders/sh_blend_replace/sh_blend_add_alpha_adj.yy @@ -0,0 +1,11 @@ +{ + "type": 1, + "parent": { + "name": "blend", + "path": "folders/shader/blend.yy", + }, + "resourceVersion": "1.0", + "name": "sh_blend_add_alpha_adj", + "tags": [], + "resourceType": "GMShader", +} \ No newline at end of file diff --git a/shaders/sh_blend_replace/sh_blend_max.yy b/shaders/sh_blend_replace/sh_blend_max.yy new file mode 100644 index 000000000..e5950293f --- /dev/null +++ b/shaders/sh_blend_replace/sh_blend_max.yy @@ -0,0 +1,11 @@ +{ + "type": 1, + "parent": { + "name": "blend", + "path": "folders/shader/blend.yy", + }, + "resourceVersion": "1.0", + "name": "sh_blend_max", + "tags": [], + "resourceType": "GMShader", +} \ No newline at end of file diff --git a/shaders/sh_blend_replace/sh_blend_multiply.yy b/shaders/sh_blend_replace/sh_blend_multiply.yy new file mode 100644 index 000000000..9cad89d11 --- /dev/null +++ b/shaders/sh_blend_replace/sh_blend_multiply.yy @@ -0,0 +1,11 @@ +{ + "type": 1, + "parent": { + "name": "shader", + "path": "folders/shader.yy", + }, + "resourceVersion": "1.0", + "name": "sh_blend_multiply", + "tags": [], + "resourceType": "GMShader", +} \ No newline at end of file diff --git a/shaders/sh_blend_replace/sh_blend_normal.yy b/shaders/sh_blend_replace/sh_blend_normal.yy new file mode 100644 index 000000000..186ec2c33 --- /dev/null +++ b/shaders/sh_blend_replace/sh_blend_normal.yy @@ -0,0 +1,11 @@ +{ + "type": 1, + "parent": { + "name": "blend", + "path": "folders/shader/blend.yy", + }, + "resourceVersion": "1.0", + "name": "sh_blend_normal", + "tags": [], + "resourceType": "GMShader", +} \ No newline at end of file diff --git a/shaders/sh_blend_replace/sh_blend_replace.fsh b/shaders/sh_blend_replace/sh_blend_replace.fsh new file mode 100644 index 000000000..c8141b4ad --- /dev/null +++ b/shaders/sh_blend_replace/sh_blend_replace.fsh @@ -0,0 +1,34 @@ +// +// Simple passthrough fragment shader +// +varying vec2 v_vTexcoord; +varying vec4 v_vColour; + +uniform vec2 dimension; +uniform int tile_type; + +uniform int useMask; +uniform int preserveAlpha; +uniform sampler2D mask; +uniform sampler2D fore; +uniform float opacity; + +float sampleMask() { + if(useMask == 0) return 1.; + vec4 m = texture2D( mask, v_vTexcoord ); + return (m.r + m.g + m.b) / 3. * m.a; +} + +void main() { + vec4 _col0 = texture2D( gm_BaseTexture, v_vTexcoord ); + + vec2 fore_tex = v_vTexcoord; + if(tile_type == 0) { + fore_tex = v_vTexcoord; + } else if(tile_type == 1) { + fore_tex = fract(v_vTexcoord * dimension); + } + + vec4 _col1 = texture2D( fore, fore_tex ); + gl_FragColor = mix(_col0, _col1, opacity * sampleMask()); +} diff --git a/shaders/sh_blend_replace/sh_blend_replace.vsh b/shaders/sh_blend_replace/sh_blend_replace.vsh new file mode 100644 index 000000000..3900c20f4 --- /dev/null +++ b/shaders/sh_blend_replace/sh_blend_replace.vsh @@ -0,0 +1,19 @@ +// +// Simple passthrough vertex shader +// +attribute vec3 in_Position; // (x,y,z) +//attribute vec3 in_Normal; // (x,y,z) unused in this shader. +attribute vec4 in_Colour; // (r,g,b,a) +attribute vec2 in_TextureCoord; // (u,v) + +varying vec2 v_vTexcoord; +varying vec4 v_vColour; + +void main() +{ + vec4 object_space_pos = vec4( in_Position.x, in_Position.y, in_Position.z, 1.0); + gl_Position = gm_Matrices[MATRIX_WORLD_VIEW_PROJECTION] * object_space_pos; + + v_vColour = in_Colour; + v_vTexcoord = in_TextureCoord; +} diff --git a/shaders/sh_blend_replace/sh_blend_replace.yy b/shaders/sh_blend_replace/sh_blend_replace.yy new file mode 100644 index 000000000..9a28a6fc9 --- /dev/null +++ b/shaders/sh_blend_replace/sh_blend_replace.yy @@ -0,0 +1,10 @@ +{ + "resourceType": "GMShader", + "resourceVersion": "1.0", + "name": "sh_blend_replace", + "type": 1, + "parent": { + "name": "blend", + "path": "folders/shader/blend.yy", + }, +} \ No newline at end of file diff --git a/shaders/sh_grid_noise/sh_grid_noise.fsh b/shaders/sh_grid_noise/sh_grid_noise.fsh index 0118bc61e..0920e48d8 100644 --- a/shaders/sh_grid_noise/sh_grid_noise.fsh +++ b/shaders/sh_grid_noise/sh_grid_noise.fsh @@ -25,10 +25,15 @@ void main() { vec2 st = v_vTexcoord - position / dimension; vec2 pos = vec2(st * scale); - if(shiftAxis == 0) - pos.x += random(vec2(0., floor(pos.y))) * shift; - else if(shiftAxis == 1) - pos.y += random(vec2(0., floor(pos.x))) * shift; + if(shiftAxis == 0) { + //pos.x += random(vec2(0., floor(pos.y))); + if(mod(pos.y, 2.) > 1.) + pos.x += shift; + } else if(shiftAxis == 1) { + //pos.y += random(vec2(0., floor(pos.x))); + if(mod(pos.x, 2.) > 1.) + pos.y += shift; + } if(useSampler == 0) { vec2 i = floor(pos); diff --git a/sprites/s_node_cache_array/32d30ea4-f058-42d5-be58-facfee2d02e8.png b/sprites/s_node_cache_array/32d30ea4-f058-42d5-be58-facfee2d02e8.png new file mode 100644 index 0000000000000000000000000000000000000000..3fce4e5ac04742c787ea7fa12ce0026d59c803ab GIT binary patch literal 966 zcmeAS@N?(olHy`uVBq!ia0vp^4j|0I1|(Ny7T#lEVD9yFaSW-L^K{mIKVe6aW6vM0 z3FFAjY~kLKA-w9~iW_Y$4N6xRsNMU@=<`Lerumxr2j4eyIlU%yU6~;8A>JfPxT;Y+ zf$NCKYSV+3w_`W)+`eRg`|qx&(|tBs-+lM<-1g1Ivu0j8c(BpptUwflloPjua|UAu zhb{x}Le>R}TNq4Q#2VTzFkQeZ$<29lQSPqqyK-LonJTE>PQLjkw{Nrh?OYfAIvdatGI`SJQ^kG;Ql(wVow@~5+f+VN@af>#?h7}^Nw@wkf> zt;sJ>cYh42yhcvVC~+`Bd+b)gNugZb9wzS z!)1>Ozm|4vVtjR@B7H_uw7KYyT}z(+>AV>Jy?jp9b9T1oq)%>dKEz!1h}ji0Guc3IT$G<3t$TdYwD%7T7Jk?uF@HzUXDPEr-l*808lR+R-%WOKx%Ot` zi;TP1HwXUvw@+Bz%3s33t}xW@@4{tu44Jd8eb{}!kga8w$Gu;78|ElvPd(XZeqiOQ zz_mVQdl|n@Il0b!!Av7h^|*(QQks*WOj6_cI>oankiTW}DV3XFRQK#s3s~)Q%_zY? zQq*YrmR+Y>vL;M?;p~0i^yWO%%Kb|=xkX&xW&62!w}QBd)^WeX-?tqL;`P|MRWgZP zKj_o0+Oo_@AK&9L=8coj>#cohc!f3aq?Pmr#oM}1?ltU;n;%(Fn%olq*F-uYPu_jv z;zrg_yY@;)C$sGdu35tM!K30y#uup*vA5>zvOMLqx}((UTe;+Hd9!!r4Ece|WgV84 z$<;CT?UD&^&VLr$y1IVC1ND40e$xX^r;NVOIko@9j3t8h`%b)Vn9D{)LWkvoKkTCA WynoVr8tQ@hlfl!~&t;ucLK6TqcEfA{ literal 0 HcmV?d00001 diff --git a/sprites/s_node_cache_array/layers/32d30ea4-f058-42d5-be58-facfee2d02e8/0ab9f754-9684-4551-ba84-8e94f04c058b.png b/sprites/s_node_cache_array/layers/32d30ea4-f058-42d5-be58-facfee2d02e8/0ab9f754-9684-4551-ba84-8e94f04c058b.png new file mode 100644 index 0000000000000000000000000000000000000000..3fce4e5ac04742c787ea7fa12ce0026d59c803ab GIT binary patch literal 966 zcmeAS@N?(olHy`uVBq!ia0vp^4j|0I1|(Ny7T#lEVD9yFaSW-L^K{mIKVe6aW6vM0 z3FFAjY~kLKA-w9~iW_Y$4N6xRsNMU@=<`Lerumxr2j4eyIlU%yU6~;8A>JfPxT;Y+ zf$NCKYSV+3w_`W)+`eRg`|qx&(|tBs-+lM<-1g1Ivu0j8c(BpptUwflloPjua|UAu zhb{x}Le>R}TNq4Q#2VTzFkQeZ$<29lQSPqqyK-LonJTE>PQLjkw{Nrh?OYfAIvdatGI`SJQ^kG;Ql(wVow@~5+f+VN@af>#?h7}^Nw@wkf> zt;sJ>cYh42yhcvVC~+`Bd+b)gNugZb9wzS z!)1>Ozm|4vVtjR@B7H_uw7KYyT}z(+>AV>Jy?jp9b9T1oq)%>dKEz!1h}ji0Guc3IT$G<3t$TdYwD%7T7Jk?uF@HzUXDPEr-l*808lR+R-%WOKx%Ot` zi;TP1HwXUvw@+Bz%3s33t}xW@@4{tu44Jd8eb{}!kga8w$Gu;78|ElvPd(XZeqiOQ zz_mVQdl|n@Il0b!!Av7h^|*(QQks*WOj6_cI>oankiTW}DV3XFRQK#s3s~)Q%_zY? zQq*YrmR+Y>vL;M?;p~0i^yWO%%Kb|=xkX&xW&62!w}QBd)^WeX-?tqL;`P|MRWgZP zKj_o0+Oo_@AK&9L=8coj>#cohc!f3aq?Pmr#oM}1?ltU;n;%(Fn%olq*F-uYPu_jv z;zrg_yY@;)C$sGdu35tM!K30y#uup*vA5>zvOMLqx}((UTe;+Hd9!!r4Ece|WgV84 z$<;CT?UD&^&VLr$y1IVC1ND40e$xX^r;NVOIko@9j3t8h`%b)Vn9D{)LWkvoKkTCA WynoVr8tQ@hlfl!~&t;ucLK6TqcEfA{ literal 0 HcmV?d00001 diff --git a/sprites/s_node_cache_array/s_node_cache_array.yy b/sprites/s_node_cache_array/s_node_cache_array.yy new file mode 100644 index 000000000..3ef2fdb37 --- /dev/null +++ b/sprites/s_node_cache_array/s_node_cache_array.yy @@ -0,0 +1,74 @@ +{ + "resourceType": "GMSprite", + "resourceVersion": "1.0", + "name": "s_node_cache_array", + "bboxMode": 0, + "collisionKind": 1, + "type": 0, + "origin": 4, + "preMultiplyAlpha": false, + "edgeFiltering": false, + "collisionTolerance": 0, + "swfPrecision": 2.525, + "bbox_left": 0, + "bbox_right": 63, + "bbox_top": 14, + "bbox_bottom": 49, + "HTile": false, + "VTile": false, + "For3D": false, + "DynamicTexturePage": false, + "width": 64, + "height": 64, + "textureGroupId": { + "name": "Default", + "path": "texturegroups/Default", + }, + "swatchColours": null, + "gridX": 0, + "gridY": 0, + "frames": [ + {"resourceType":"GMSpriteFrame","resourceVersion":"1.1","name":"32d30ea4-f058-42d5-be58-facfee2d02e8",}, + ], + "sequence": { + "resourceType": "GMSequence", + "resourceVersion": "1.4", + "name": "s_node_cache_array", + "timeUnits": 1, + "playback": 1, + "playbackSpeed": 30.0, + "playbackSpeedType": 0, + "autoRecord": true, + "volume": 1.0, + "length": 1.0, + "events": {"Keyframes":[],"resourceVersion":"1.0","resourceType":"KeyframeStore",}, + "moments": {"Keyframes":[],"resourceVersion":"1.0","resourceType":"KeyframeStore",}, + "tracks": [ + {"resourceType":"GMSpriteFramesTrack","resourceVersion":"1.0","name":"frames","spriteId":null,"keyframes":{"Keyframes":[ + {"id":"fa4b839f-08f2-435c-beae-3fa1270286ce","Key":0.0,"Length":1.0,"Stretch":false,"Disabled":false,"IsCreationKey":false,"Channels":{"0":{"Id":{"name":"32d30ea4-f058-42d5-be58-facfee2d02e8","path":"sprites/s_node_cache_array/s_node_cache_array.yy",},"resourceVersion":"1.0","resourceType":"SpriteFrameKeyframe",},},"resourceVersion":"1.0","resourceType":"Keyframe",}, + ],"resourceVersion":"1.0","resourceType":"KeyframeStore",},"trackColour":0,"inheritsTrackColour":true,"builtinName":0,"traits":0,"interpolation":1,"tracks":[],"events":[],"isCreationTrack":false,"modifiers":[],}, + ], + "visibleRange": null, + "lockOrigin": false, + "showBackdrop": true, + "showBackdropImage": false, + "backdropImagePath": "", + "backdropImageOpacity": 0.5, + "backdropWidth": 1366, + "backdropHeight": 768, + "backdropXOffset": 0.0, + "backdropYOffset": 0.0, + "xorigin": 32, + "yorigin": 32, + "eventToFunction": {}, + "eventStubScript": null, + }, + "layers": [ + {"resourceType":"GMImageLayer","resourceVersion":"1.0","name":"0ab9f754-9684-4551-ba84-8e94f04c058b","visible":true,"isLocked":false,"blendMode":0,"opacity":100.0,"displayName":"default",}, + ], + "nineSlice": null, + "parent": { + "name": "node", + "path": "folders/nodes/icons/node.yy", + }, +} \ No newline at end of file diff --git a/sprites/s_node_grid_noise/s_node_grid_noise.yy b/sprites/s_node_grid_noise/s_node_grid_noise.yy index e92b3d170..c2857d281 100644 --- a/sprites/s_node_grid_noise/s_node_grid_noise.yy +++ b/sprites/s_node_grid_noise/s_node_grid_noise.yy @@ -48,7 +48,7 @@ {"id":"dfdfa85e-b8c6-44b1-8057-3f306bc7d333","Key":0.0,"Length":1.0,"Stretch":false,"Disabled":false,"IsCreationKey":false,"Channels":{"0":{"Id":{"name":"c8995f04-9db1-482a-893c-a59ce7e426e2","path":"sprites/s_node_grid_noise/s_node_grid_noise.yy",},"resourceVersion":"1.0","resourceType":"SpriteFrameKeyframe",},},"resourceVersion":"1.0","resourceType":"Keyframe",}, ],"resourceVersion":"1.0","resourceType":"KeyframeStore",},"trackColour":0,"inheritsTrackColour":true,"builtinName":0,"traits":0,"interpolation":1,"tracks":[],"events":[],"isCreationTrack":false,"modifiers":[],}, ], - "visibleRange": {"x":0.0,"y":0.0,}, + "visibleRange": null, "lockOrigin": false, "showBackdrop": true, "showBackdropImage": false, diff --git a/sprites/s_node_iterator_amount/a41c1b6a-de41-46f4-b85c-b8ce499ddfb4.png b/sprites/s_node_iterator_amount/a41c1b6a-de41-46f4-b85c-b8ce499ddfb4.png new file mode 100644 index 0000000000000000000000000000000000000000..e23b2cc5d3892a0511389b5adc9c3aa22a9e23c1 GIT binary patch literal 1224 zcmV;(1ULJMP)1 zy;9pi5LRZkH#BMS@B-FM9sn0klO{B&QI$5Paym>GRk%%>C~eZ1Iuzys7~lmmrganY z1Y{SlGKxlf|MJQ3&D>~^Pj~x$x7u6X9q{n*kUVEVYy)BgVjB<}5Zi#*fY=5+3jy+E zHN*>*6w3}@d$nqRu-sr-a#>80my4|xAWv3@c*&S}ooo}R&H)#~3ARC^kO&2eG4H$p zd9tF>9W(L008Nr8Z>eD0cX%zZ%utN`0Bt`am;h)X5uX~4whKtm6D(uwYlSsP}cz^`IMjMWOya8Mv#Exmyk1QU!FXoMp47*Za^Nh3p$_B?DYi!*(Y^rrI?xpyoOGbTHRC9*3|uS-m3gHfA~iM$s7Gae z+W-kRl^G`Fi8uu+s_O(MLgLMkT*d)bB?Q?-{n7N>jsW@E?RDf&(Rea87+A;x`=9bm zAc3aK!sc}V(~8*eSo6+P(lYdo$|{hsXvdsmNl)=Q+?WPNFsXzMrkZGf%jAP4C=y6u zw5QJ^3>1NJVKNwC*l*DV@+GJ*BskQFKsM9B`3aD(U4Ni)`;C!r5Me324g<1X_bPzu zN1j?#0WAvo1`)1>Dikx6Q!r@y7%PI!X`2DhGA5h~vjf>)exo=EkO}wiLQi!8W`|73 z6EY_O^7Z$;lz5nu-^KDu`0YZtKdSwGh2^(FUu4tQhWmTOMOse)$I&;<@QD0R;kVa< z2=)3>z5hTqAyFw?Breth42AnazQYj{6JnN_3Hge|C214@l^iO9pL2fS;Oe8mA{2rE zJ>t}~#t1?~l46&Er@f$Fz|-QT@F`84j0NZm_d~DJk_WuU@+DxK3qgQJPGBj3@4Qc= zz0alU1tA5HY_t*}74B2o>5Cl8=gQyvfxTd9!wH1SjR7z~<~QPLZPJz(aAs)C2|{%0 zfR9+dx9A1N071nUE%*C_<3Tm+`^5L-3$P*NH34?n3$7ID^OF+bg3G8D3x4@Ditm4_ zSi9(y0FoE@j=t3t4xXL0;RU|1n!+Jq$DzEy7sG86;DV$7JKu(Q3GcurjR)UO1Lg(Z z0w{Kc{z#`yAV8PC&6Hs9eK5JXy^Y2QuDh9zQl+ zy#gz%Hb*^ZF+-mC?mhXX-%(#v!Wpx9;s#=MM0F(7sLM~m$iV6tARS=3&M zQjqf6(;Sa|{5IH10qS5Pl;{8ZhUZV=s+Syu@&a&qD1s=r9Sh>gELSzT#>9TPzS00001 zy;9pi5LRZkH#BMS@B-FM9sn0klO{B&QI$5Paym>GRk%%>C~eZ1Iuzys7~lmmrganY z1Y{SlGKxlf|MJQ3&D>~^Pj~x$x7u6X9q{n*kUVEVYy)BgVjB<}5Zi#*fY=5+3jy+E zHN*>*6w3}@d$nqRu-sr-a#>80my4|xAWv3@c*&S}ooo}R&H)#~3ARC^kO&2eG4H$p zd9tF>9W(L008Nr8Z>eD0cX%zZ%utN`0Bt`am;h)X5uX~4whKtm6D(uwYlSsP}cz^`IMjMWOya8Mv#Exmyk1QU!FXoMp47*Za^Nh3p$_B?DYi!*(Y^rrI?xpyoOGbTHRC9*3|uS-m3gHfA~iM$s7Gae z+W-kRl^G`Fi8uu+s_O(MLgLMkT*d)bB?Q?-{n7N>jsW@E?RDf&(Rea87+A;x`=9bm zAc3aK!sc}V(~8*eSo6+P(lYdo$|{hsXvdsmNl)=Q+?WPNFsXzMrkZGf%jAP4C=y6u zw5QJ^3>1NJVKNwC*l*DV@+GJ*BskQFKsM9B`3aD(U4Ni)`;C!r5Me324g<1X_bPzu zN1j?#0WAvo1`)1>Dikx6Q!r@y7%PI!X`2DhGA5h~vjf>)exo=EkO}wiLQi!8W`|73 z6EY_O^7Z$;lz5nu-^KDu`0YZtKdSwGh2^(FUu4tQhWmTOMOse)$I&;<@QD0R;kVa< z2=)3>z5hTqAyFw?Breth42AnazQYj{6JnN_3Hge|C214@l^iO9pL2fS;Oe8mA{2rE zJ>t}~#t1?~l46&Er@f$Fz|-QT@F`84j0NZm_d~DJk_WuU@+DxK3qgQJPGBj3@4Qc= zz0alU1tA5HY_t*}74B2o>5Cl8=gQyvfxTd9!wH1SjR7z~<~QPLZPJz(aAs)C2|{%0 zfR9+dx9A1N071nUE%*C_<3Tm+`^5L-3$P*NH34?n3$7ID^OF+bg3G8D3x4@Ditm4_ zSi9(y0FoE@j=t3t4xXL0;RU|1n!+Jq$DzEy7sG86;DV$7JKu(Q3GcurjR)UO1Lg(Z z0w{Kc{z#`yAV8PC&6Hs9eK5JXy^Y2QuDh9zQl+ zy#gz%Hb*^ZF+-mC?mhXX-%(#v!Wpx9;s#=MM0F(7sLM~m$iV6tARS=3&M zQjqf6(;Sa|{5IH10qS5Pl;{8ZhUZV=s+Syu@&a&qD1s=r9Sh>gELSzT#>9TPzS0000",}, + "moments": {"Keyframes":[],"resourceVersion":"1.0","resourceType":"KeyframeStore",}, + "tracks": [ + {"resourceType":"GMSpriteFramesTrack","resourceVersion":"1.0","name":"frames","spriteId":null,"keyframes":{"Keyframes":[ + {"id":"79d2c811-5dd6-4704-8733-35bbc72d5c96","Key":0.0,"Length":1.0,"Stretch":false,"Disabled":false,"IsCreationKey":false,"Channels":{"0":{"Id":{"name":"a41c1b6a-de41-46f4-b85c-b8ce499ddfb4","path":"sprites/s_node_iterator_amount/s_node_iterator_amount.yy",},"resourceVersion":"1.0","resourceType":"SpriteFrameKeyframe",},},"resourceVersion":"1.0","resourceType":"Keyframe",}, + ],"resourceVersion":"1.0","resourceType":"KeyframeStore",},"trackColour":0,"inheritsTrackColour":true,"builtinName":0,"traits":0,"interpolation":1,"tracks":[],"events":[],"isCreationTrack":false,"modifiers":[],}, + ], + "visibleRange": null, + "lockOrigin": false, + "showBackdrop": true, + "showBackdropImage": false, + "backdropImagePath": "", + "backdropImageOpacity": 0.5, + "backdropWidth": 1366, + "backdropHeight": 768, + "backdropXOffset": 0.0, + "backdropYOffset": 0.0, + "xorigin": 32, + "yorigin": 32, + "eventToFunction": {}, + "eventStubScript": null, + }, + "layers": [ + {"resourceType":"GMImageLayer","resourceVersion":"1.0","name":"0029c8ae-6fba-4656-8fed-55f184dcf049","visible":true,"isLocked":false,"blendMode":0,"opacity":100.0,"displayName":"default",}, + ], + "nineSlice": null, + "parent": { + "name": "node", + "path": "folders/nodes/icons/node.yy", + }, +} \ No newline at end of file diff --git a/sprites/s_node_iterator_length/bf3c1c69-a52c-42b9-a02e-0196b33d9955.png b/sprites/s_node_iterator_length/bf3c1c69-a52c-42b9-a02e-0196b33d9955.png new file mode 100644 index 0000000000000000000000000000000000000000..e69e444f8654eaf40fd70cbc4d6208cb57ec5f29 GIT binary patch literal 558 zcmeAS@N?(olHy`uVBq!ia0vp^4j|0I1|(Ny7T#lEVEpRo;uumf=jlvaFXliIH}@Y_ z-6bo}GO?VVvd-aB)JvgDtZSC}PFG#BnRlJS(xnfWeCF!4eyv!4=7jRhz>br1j#snm zeLie3=lwbT_bXSeQc8E>zR)4IKv35~IjX^J3qx-PqtrzvlSQlCgmh78qG=t~mq4$4+?3^D>W|?`Gx1wUc#Lb%hEVXS*=E-{f z&C8fCRs2e}f8RV|u;)SMFJt_i^!oh&Mfc|1vQ9jyF}HnP4Od?zOMZR4|0>4VpCU2> zb-#lC@N9b~tRN)%>*>suoAMm=z@aIS%ba%f!y^BQ#h1VO1>aZNxG=$1M(Xp|D;Z~( zKWNDOvHHg3kojAl1%EiBFZ}1P?!Qy&2UN9iM#VmcwC&;TcNSZ%1f~N9Pgg&ebxsLQ E01|!rEdT%j literal 0 HcmV?d00001 diff --git a/sprites/s_node_iterator_length/layers/bf3c1c69-a52c-42b9-a02e-0196b33d9955/13d238aa-df20-4732-a719-28010df9fe42.png b/sprites/s_node_iterator_length/layers/bf3c1c69-a52c-42b9-a02e-0196b33d9955/13d238aa-df20-4732-a719-28010df9fe42.png new file mode 100644 index 0000000000000000000000000000000000000000..e69e444f8654eaf40fd70cbc4d6208cb57ec5f29 GIT binary patch literal 558 zcmeAS@N?(olHy`uVBq!ia0vp^4j|0I1|(Ny7T#lEVEpRo;uumf=jlvaFXliIH}@Y_ z-6bo}GO?VVvd-aB)JvgDtZSC}PFG#BnRlJS(xnfWeCF!4eyv!4=7jRhz>br1j#snm zeLie3=lwbT_bXSeQc8E>zR)4IKv35~IjX^J3qx-PqtrzvlSQlCgmh78qG=t~mq4$4+?3^D>W|?`Gx1wUc#Lb%hEVXS*=E-{f z&C8fCRs2e}f8RV|u;)SMFJt_i^!oh&Mfc|1vQ9jyF}HnP4Od?zOMZR4|0>4VpCU2> zb-#lC@N9b~tRN)%>*>suoAMm=z@aIS%ba%f!y^BQ#h1VO1>aZNxG=$1M(Xp|D;Z~( zKWNDOvHHg3kojAl1%EiBFZ}1P?!Qy&2UN9iM#VmcwC&;TcNSZ%1f~N9Pgg&ebxsLQ E01|!rEdT%j literal 0 HcmV?d00001 diff --git a/sprites/s_node_iterator_length/s_node_iterator_length.yy b/sprites/s_node_iterator_length/s_node_iterator_length.yy new file mode 100644 index 000000000..6c24a2082 --- /dev/null +++ b/sprites/s_node_iterator_length/s_node_iterator_length.yy @@ -0,0 +1,74 @@ +{ + "resourceType": "GMSprite", + "resourceVersion": "1.0", + "name": "s_node_iterator_length", + "bboxMode": 0, + "collisionKind": 1, + "type": 0, + "origin": 4, + "preMultiplyAlpha": false, + "edgeFiltering": false, + "collisionTolerance": 0, + "swfPrecision": 2.525, + "bbox_left": 0, + "bbox_right": 63, + "bbox_top": 10, + "bbox_bottom": 53, + "HTile": false, + "VTile": false, + "For3D": false, + "DynamicTexturePage": false, + "width": 64, + "height": 64, + "textureGroupId": { + "name": "Default", + "path": "texturegroups/Default", + }, + "swatchColours": null, + "gridX": 0, + "gridY": 0, + "frames": [ + {"resourceType":"GMSpriteFrame","resourceVersion":"1.1","name":"bf3c1c69-a52c-42b9-a02e-0196b33d9955",}, + ], + "sequence": { + "resourceType": "GMSequence", + "resourceVersion": "1.4", + "name": "s_node_iterator_length", + "timeUnits": 1, + "playback": 1, + "playbackSpeed": 30.0, + "playbackSpeedType": 0, + "autoRecord": true, + "volume": 1.0, + "length": 1.0, + "events": {"Keyframes":[],"resourceVersion":"1.0","resourceType":"KeyframeStore",}, + "moments": {"Keyframes":[],"resourceVersion":"1.0","resourceType":"KeyframeStore",}, + "tracks": [ + {"resourceType":"GMSpriteFramesTrack","resourceVersion":"1.0","name":"frames","spriteId":null,"keyframes":{"Keyframes":[ + {"id":"cd8830b4-40af-4659-b2de-f81754c76bbb","Key":0.0,"Length":1.0,"Stretch":false,"Disabled":false,"IsCreationKey":false,"Channels":{"0":{"Id":{"name":"bf3c1c69-a52c-42b9-a02e-0196b33d9955","path":"sprites/s_node_iterator_length/s_node_iterator_length.yy",},"resourceVersion":"1.0","resourceType":"SpriteFrameKeyframe",},},"resourceVersion":"1.0","resourceType":"Keyframe",}, + ],"resourceVersion":"1.0","resourceType":"KeyframeStore",},"trackColour":0,"inheritsTrackColour":true,"builtinName":0,"traits":0,"interpolation":1,"tracks":[],"events":[],"isCreationTrack":false,"modifiers":[],}, + ], + "visibleRange": null, + "lockOrigin": false, + "showBackdrop": true, + "showBackdropImage": false, + "backdropImagePath": "", + "backdropImageOpacity": 0.5, + "backdropWidth": 1366, + "backdropHeight": 768, + "backdropXOffset": 0.0, + "backdropYOffset": 0.0, + "xorigin": 32, + "yorigin": 32, + "eventToFunction": {}, + "eventStubScript": null, + }, + "layers": [ + {"resourceType":"GMImageLayer","resourceVersion":"1.0","name":"13d238aa-df20-4732-a719-28010df9fe42","visible":true,"isLocked":false,"blendMode":0,"opacity":100.0,"displayName":"default",}, + ], + "nineSlice": null, + "parent": { + "name": "node", + "path": "folders/nodes/icons/node.yy", + }, +} \ No newline at end of file