mirror of
https://github.com/Ttanasart-pt/Pixel-Composer.git
synced 2025-03-03 14:14:49 +01:00
Path anchor, image replace
This commit is contained in:
parent
35eb2f9ef4
commit
269bb63cda
66 changed files with 1229 additions and 220 deletions
|
@ -139,6 +139,7 @@
|
||||||
{"name":"sprites","order":12,"path":"folders/sprites.yy",},
|
{"name":"sprites","order":12,"path":"folders/sprites.yy",},
|
||||||
{"name":"gameframe","order":2,"path":"folders/sprites/gameframe.yy",},
|
{"name":"gameframe","order":2,"path":"folders/sprites/gameframe.yy",},
|
||||||
{"name":"widgets","order":5,"path":"folders/widgets.yy",},
|
{"name":"widgets","order":5,"path":"folders/widgets.yy",},
|
||||||
|
{"name":"surface replace","order":53,"path":"folders/shader/surface replace.yy",},
|
||||||
],
|
],
|
||||||
"ResourceOrderSettings": [
|
"ResourceOrderSettings": [
|
||||||
{"name":"s_node_corner","order":14,"path":"sprites/s_node_corner/s_node_corner.yy",},
|
{"name":"s_node_corner","order":14,"path":"sprites/s_node_corner/s_node_corner.yy",},
|
||||||
|
@ -165,6 +166,7 @@
|
||||||
{"name":"s_node_grid_tri_noise","order":22,"path":"sprites/s_node_grid_tri_noise/s_node_grid_tri_noise.yy",},
|
{"name":"s_node_grid_tri_noise","order":22,"path":"sprites/s_node_grid_tri_noise/s_node_grid_tri_noise.yy",},
|
||||||
{"name":"o_dialog_menubox","order":1,"path":"objects/o_dialog_menubox/o_dialog_menubox.yy",},
|
{"name":"o_dialog_menubox","order":1,"path":"objects/o_dialog_menubox/o_dialog_menubox.yy",},
|
||||||
{"name":"s_node_blend","order":5,"path":"sprites/s_node_blend/s_node_blend.yy",},
|
{"name":"s_node_blend","order":5,"path":"sprites/s_node_blend/s_node_blend.yy",},
|
||||||
|
{"name":"node_wrap_perspective","order":15,"path":"scripts/node_wrap_perspective/node_wrap_perspective.yy",},
|
||||||
{"name":"s_node_rigidSim_object_spawner","order":5,"path":"sprites/s_node_rigidSim_object_spawner/s_node_rigidSim_object_spawner.yy",},
|
{"name":"s_node_rigidSim_object_spawner","order":5,"path":"sprites/s_node_rigidSim_object_spawner/s_node_rigidSim_object_spawner.yy",},
|
||||||
{"name":"draw_text_function","order":11,"path":"scripts/draw_text_function/draw_text_function.yy",},
|
{"name":"draw_text_function","order":11,"path":"scripts/draw_text_function/draw_text_function.yy",},
|
||||||
{"name":"o_dialog_file_name_collection","order":5,"path":"objects/o_dialog_file_name_collection/o_dialog_file_name_collection.yy",},
|
{"name":"o_dialog_file_name_collection","order":5,"path":"objects/o_dialog_file_name_collection/o_dialog_file_name_collection.yy",},
|
||||||
|
@ -400,6 +402,7 @@
|
||||||
{"name":"node_fluid_render","order":2,"path":"scripts/node_fluid_render/node_fluid_render.yy",},
|
{"name":"node_fluid_render","order":2,"path":"scripts/node_fluid_render/node_fluid_render.yy",},
|
||||||
{"name":"s_node_invert","order":25,"path":"sprites/s_node_invert/s_node_invert.yy",},
|
{"name":"s_node_invert","order":25,"path":"sprites/s_node_invert/s_node_invert.yy",},
|
||||||
{"name":"draw_text_delimiter","order":14,"path":"scripts/draw_text_delimiter/draw_text_delimiter.yy",},
|
{"name":"draw_text_delimiter","order":14,"path":"scripts/draw_text_delimiter/draw_text_delimiter.yy",},
|
||||||
|
{"name":"s_node_path_anchor","order":13,"path":"sprites/s_node_path_anchor/s_node_path_anchor.yy",},
|
||||||
{"name":"node_array_get","order":10,"path":"scripts/node_array_get/node_array_get.yy",},
|
{"name":"node_array_get","order":10,"path":"scripts/node_array_get/node_array_get.yy",},
|
||||||
{"name":"Apollo","order":6,"path":"extensions/Apollo/Apollo.yy",},
|
{"name":"Apollo","order":6,"path":"extensions/Apollo/Apollo.yy",},
|
||||||
{"name":"sh_grid","order":14,"path":"shaders/sh_grid/sh_grid.yy",},
|
{"name":"sh_grid","order":14,"path":"shaders/sh_grid/sh_grid.yy",},
|
||||||
|
@ -445,8 +448,10 @@
|
||||||
{"name":"s_node_random","order":3,"path":"sprites/s_node_random/s_node_random.yy",},
|
{"name":"s_node_random","order":3,"path":"sprites/s_node_random/s_node_random.yy",},
|
||||||
{"name":"s_node_color_remove","order":7,"path":"sprites/s_node_color_remove/s_node_color_remove.yy",},
|
{"name":"s_node_color_remove","order":7,"path":"sprites/s_node_color_remove/s_node_color_remove.yy",},
|
||||||
{"name":"sh_average","order":7,"path":"shaders/sh_average/sh_average.yy",},
|
{"name":"sh_average","order":7,"path":"shaders/sh_average/sh_average.yy",},
|
||||||
|
{"name":"sh_warp_4points_pers","order":10,"path":"shaders/sh_warp_4points_pers/sh_warp_4points_pers.yy",},
|
||||||
{"name":"node_mirror","order":3,"path":"scripts/node_mirror/node_mirror.yy",},
|
{"name":"node_mirror","order":3,"path":"scripts/node_mirror/node_mirror.yy",},
|
||||||
{"name":"node_corner","order":6,"path":"scripts/node_corner/node_corner.yy",},
|
{"name":"node_corner","order":6,"path":"scripts/node_corner/node_corner.yy",},
|
||||||
|
{"name":"node_path_anchor","order":13,"path":"scripts/node_path_anchor/node_path_anchor.yy",},
|
||||||
{"name":"s_node_path_wave","order":7,"path":"sprites/s_node_path_wave/s_node_path_wave.yy",},
|
{"name":"s_node_path_wave","order":7,"path":"sprites/s_node_path_wave/s_node_path_wave.yy",},
|
||||||
{"name":"string_function","order":6,"path":"scripts/string_function/string_function.yy",},
|
{"name":"string_function","order":6,"path":"scripts/string_function/string_function.yy",},
|
||||||
{"name":"o_dialog_palette","order":2,"path":"objects/o_dialog_palette/o_dialog_palette.yy",},
|
{"name":"o_dialog_palette","order":2,"path":"objects/o_dialog_palette/o_dialog_palette.yy",},
|
||||||
|
@ -560,6 +565,7 @@
|
||||||
{"name":"node_perlin","order":1,"path":"scripts/node_perlin/node_perlin.yy",},
|
{"name":"node_perlin","order":1,"path":"scripts/node_perlin/node_perlin.yy",},
|
||||||
{"name":"node_blur_simple","order":4,"path":"scripts/node_blur_simple/node_blur_simple.yy",},
|
{"name":"node_blur_simple","order":4,"path":"scripts/node_blur_simple/node_blur_simple.yy",},
|
||||||
{"name":"node_feedback_input","order":1,"path":"scripts/node_feedback_input/node_feedback_input.yy",},
|
{"name":"node_feedback_input","order":1,"path":"scripts/node_feedback_input/node_feedback_input.yy",},
|
||||||
|
{"name":"s_node_base_conversion","order":10,"path":"sprites/s_node_base_conversion/s_node_base_conversion.yy",},
|
||||||
{"name":"s_node_loop_array","order":23,"path":"sprites/s_node_loop_array/s_node_loop_array.yy",},
|
{"name":"s_node_loop_array","order":23,"path":"sprites/s_node_loop_array/s_node_loop_array.yy",},
|
||||||
{"name":"s_node_iterator_amount","order":26,"path":"sprites/s_node_iterator_amount/s_node_iterator_amount.yy",},
|
{"name":"s_node_iterator_amount","order":26,"path":"sprites/s_node_iterator_amount/s_node_iterator_amount.yy",},
|
||||||
{"name":"sh_color_adjust","order":6,"path":"shaders/sh_color_adjust/sh_color_adjust.yy",},
|
{"name":"sh_color_adjust","order":6,"path":"shaders/sh_color_adjust/sh_color_adjust.yy",},
|
||||||
|
@ -580,6 +586,7 @@
|
||||||
{"name":"sh_channel_R_grey","order":7,"path":"shaders/sh_channel_R_grey/sh_channel_R_grey.yy",},
|
{"name":"sh_channel_R_grey","order":7,"path":"shaders/sh_channel_R_grey/sh_channel_R_grey.yy",},
|
||||||
{"name":"sh_blend_subtract","order":5,"path":"shaders/sh_blend_subtract/sh_blend_subtract.yy",},
|
{"name":"sh_blend_subtract","order":5,"path":"shaders/sh_blend_subtract/sh_blend_subtract.yy",},
|
||||||
{"name":"panel_animation","order":1,"path":"scripts/panel_animation/panel_animation.yy",},
|
{"name":"panel_animation","order":1,"path":"scripts/panel_animation/panel_animation.yy",},
|
||||||
|
{"name":"node_surface_replace","order":29,"path":"scripts/node_surface_replace/node_surface_replace.yy",},
|
||||||
{"name":"node_strand_create","order":1,"path":"scripts/node_strand_create/node_strand_create.yy",},
|
{"name":"node_strand_create","order":1,"path":"scripts/node_strand_create/node_strand_create.yy",},
|
||||||
{"name":"sh_gradient","order":17,"path":"shaders/sh_gradient/sh_gradient.yy",},
|
{"name":"sh_gradient","order":17,"path":"shaders/sh_gradient/sh_gradient.yy",},
|
||||||
{"name":"node_json_file_read","order":8,"path":"scripts/node_json_file_read/node_json_file_read.yy",},
|
{"name":"node_json_file_read","order":8,"path":"scripts/node_json_file_read/node_json_file_read.yy",},
|
||||||
|
@ -652,6 +659,7 @@
|
||||||
{"name":"node_trigger_bool","order":1,"path":"scripts/node_trigger_bool/node_trigger_bool.yy",},
|
{"name":"node_trigger_bool","order":1,"path":"scripts/node_trigger_bool/node_trigger_bool.yy",},
|
||||||
{"name":"s_node_strandSim_gravity","order":4,"path":"sprites/s_node_strandSim_gravity/s_node_strandSim_gravity.yy",},
|
{"name":"s_node_strandSim_gravity","order":4,"path":"sprites/s_node_strandSim_gravity/s_node_strandSim_gravity.yy",},
|
||||||
{"name":"node_VFX_effect_turbulence","order":11,"path":"scripts/node_VFX_effect_turbulence/node_VFX_effect_turbulence.yy",},
|
{"name":"node_VFX_effect_turbulence","order":11,"path":"scripts/node_VFX_effect_turbulence/node_VFX_effect_turbulence.yy",},
|
||||||
|
{"name":"sh_surface_replace_replace","order":1,"path":"shaders/sh_surface_replace_replace/sh_surface_replace_replace.yy",},
|
||||||
{"name":"node_ase_file_read","order":14,"path":"scripts/node_ase_file_read/node_ase_file_read.yy",},
|
{"name":"node_ase_file_read","order":14,"path":"scripts/node_ase_file_read/node_ase_file_read.yy",},
|
||||||
{"name":"sh_seperate_shape_counter","order":1,"path":"shaders/sh_seperate_shape_counter/sh_seperate_shape_counter.yy",},
|
{"name":"sh_seperate_shape_counter","order":1,"path":"shaders/sh_seperate_shape_counter/sh_seperate_shape_counter.yy",},
|
||||||
{"name":"s_node_stack","order":35,"path":"sprites/s_node_stack/s_node_stack.yy",},
|
{"name":"s_node_stack","order":35,"path":"sprites/s_node_stack/s_node_stack.yy",},
|
||||||
|
@ -751,6 +759,7 @@
|
||||||
{"name":"area_function","order":2,"path":"scripts/area_function/area_function.yy",},
|
{"name":"area_function","order":2,"path":"scripts/area_function/area_function.yy",},
|
||||||
{"name":"node_mesh_to_path","order":3,"path":"scripts/node_mesh_to_path/node_mesh_to_path.yy",},
|
{"name":"node_mesh_to_path","order":3,"path":"scripts/node_mesh_to_path/node_mesh_to_path.yy",},
|
||||||
{"name":"sh_convolution","order":44,"path":"shaders/sh_convolution/sh_convolution.yy",},
|
{"name":"sh_convolution","order":44,"path":"shaders/sh_convolution/sh_convolution.yy",},
|
||||||
|
{"name":"number_function","order":14,"path":"scripts/number_function/number_function.yy",},
|
||||||
{"name":"s_node_array_shift","order":12,"path":"sprites/s_node_array_shift/s_node_array_shift.yy",},
|
{"name":"s_node_array_shift","order":12,"path":"sprites/s_node_array_shift/s_node_array_shift.yy",},
|
||||||
{"name":"s_node_statistic","order":5,"path":"sprites/s_node_statistic/s_node_statistic.yy",},
|
{"name":"s_node_statistic","order":5,"path":"sprites/s_node_statistic/s_node_statistic.yy",},
|
||||||
{"name":"s_node_cache_array","order":25,"path":"sprites/s_node_cache_array/s_node_cache_array.yy",},
|
{"name":"s_node_cache_array","order":25,"path":"sprites/s_node_cache_array/s_node_cache_array.yy",},
|
||||||
|
@ -950,6 +959,7 @@
|
||||||
{"name":"node_csv_file_read","order":9,"path":"scripts/node_csv_file_read/node_csv_file_read.yy",},
|
{"name":"node_csv_file_read","order":9,"path":"scripts/node_csv_file_read/node_csv_file_read.yy",},
|
||||||
{"name":"scrollPane","order":14,"path":"scripts/scrollPane/scrollPane.yy",},
|
{"name":"scrollPane","order":14,"path":"scripts/scrollPane/scrollPane.yy",},
|
||||||
{"name":"node_gradient_extract","order":13,"path":"scripts/node_gradient_extract/node_gradient_extract.yy",},
|
{"name":"node_gradient_extract","order":13,"path":"scripts/node_gradient_extract/node_gradient_extract.yy",},
|
||||||
|
{"name":"node_base_convert","order":25,"path":"scripts/node_base_convert/node_base_convert.yy",},
|
||||||
{"name":"s_node_normal_light","order":29,"path":"sprites/s_node_normal_light/s_node_normal_light.yy",},
|
{"name":"s_node_normal_light","order":29,"path":"sprites/s_node_normal_light/s_node_normal_light.yy",},
|
||||||
{"name":"node_transform_single","order":1,"path":"scripts/node_transform_single/node_transform_single.yy",},
|
{"name":"node_transform_single","order":1,"path":"scripts/node_transform_single/node_transform_single.yy",},
|
||||||
{"name":"node_string_length","order":22,"path":"scripts/node_string_length/node_string_length.yy",},
|
{"name":"node_string_length","order":22,"path":"scripts/node_string_length/node_string_length.yy",},
|
||||||
|
@ -1025,6 +1035,7 @@
|
||||||
{"name":"s_node_bokeh","order":49,"path":"sprites/s_node_bokeh/s_node_bokeh.yy",},
|
{"name":"s_node_bokeh","order":49,"path":"sprites/s_node_bokeh/s_node_bokeh.yy",},
|
||||||
{"name":"sh_vertex_depth_pass","order":6,"path":"shaders/sh_vertex_depth_pass/sh_vertex_depth_pass.yy",},
|
{"name":"sh_vertex_depth_pass","order":6,"path":"shaders/sh_vertex_depth_pass/sh_vertex_depth_pass.yy",},
|
||||||
{"name":"sh_curve","order":3,"path":"shaders/sh_curve/sh_curve.yy",},
|
{"name":"sh_curve","order":3,"path":"shaders/sh_curve/sh_curve.yy",},
|
||||||
|
{"name":"sh_warp_4points","order":9,"path":"shaders/sh_warp_4points/sh_warp_4points.yy",},
|
||||||
{"name":"_f_p2","order":4,"path":"fonts/_f_p2/_f_p2.yy",},
|
{"name":"_f_p2","order":4,"path":"fonts/_f_p2/_f_p2.yy",},
|
||||||
{"name":"fd_rectangle_get_pressure_iteration_type","order":17,"path":"scripts/fd_rectangle_get_pressure_iteration_type/fd_rectangle_get_pressure_iteration_type.yy",},
|
{"name":"fd_rectangle_get_pressure_iteration_type","order":17,"path":"scripts/fd_rectangle_get_pressure_iteration_type/fd_rectangle_get_pressure_iteration_type.yy",},
|
||||||
{"name":"node_text_file_write","order":11,"path":"scripts/node_text_file_write/node_text_file_write.yy",},
|
{"name":"node_text_file_write","order":11,"path":"scripts/node_text_file_write/node_text_file_write.yy",},
|
||||||
|
|
|
@ -171,6 +171,7 @@
|
||||||
{"resourceType":"GMFolder","resourceVersion":"1.0","name":"Steamworks","folderPath":"folders/Steamworks.yy",},
|
{"resourceType":"GMFolder","resourceVersion":"1.0","name":"Steamworks","folderPath":"folders/Steamworks.yy",},
|
||||||
{"resourceType":"GMFolder","resourceVersion":"1.0","name":"UGC","folderPath":"folders/Steamworks/UGC.yy",},
|
{"resourceType":"GMFolder","resourceVersion":"1.0","name":"UGC","folderPath":"folders/Steamworks/UGC.yy",},
|
||||||
{"resourceType":"GMFolder","resourceVersion":"1.0","name":"widgets","folderPath":"folders/widgets.yy",},
|
{"resourceType":"GMFolder","resourceVersion":"1.0","name":"widgets","folderPath":"folders/widgets.yy",},
|
||||||
|
{"resourceType":"GMFolder","resourceVersion":"1.0","name":"surface replace","folderPath":"folders/shader/surface replace.yy",},
|
||||||
],
|
],
|
||||||
"IncludedFiles": [
|
"IncludedFiles": [
|
||||||
{"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"ApolloHelp.html","CopyToMask":-1,"filePath":"datafiles",},
|
{"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"ApolloHelp.html","CopyToMask":-1,"filePath":"datafiles",},
|
||||||
|
@ -570,6 +571,7 @@
|
||||||
{"id":{"name":"s_node_grid_tri_noise","path":"sprites/s_node_grid_tri_noise/s_node_grid_tri_noise.yy",},},
|
{"id":{"name":"s_node_grid_tri_noise","path":"sprites/s_node_grid_tri_noise/s_node_grid_tri_noise.yy",},},
|
||||||
{"id":{"name":"o_dialog_menubox","path":"objects/o_dialog_menubox/o_dialog_menubox.yy",},},
|
{"id":{"name":"o_dialog_menubox","path":"objects/o_dialog_menubox/o_dialog_menubox.yy",},},
|
||||||
{"id":{"name":"s_node_blend","path":"sprites/s_node_blend/s_node_blend.yy",},},
|
{"id":{"name":"s_node_blend","path":"sprites/s_node_blend/s_node_blend.yy",},},
|
||||||
|
{"id":{"name":"node_wrap_perspective","path":"scripts/node_wrap_perspective/node_wrap_perspective.yy",},},
|
||||||
{"id":{"name":"s_node_rigidSim_object_spawner","path":"sprites/s_node_rigidSim_object_spawner/s_node_rigidSim_object_spawner.yy",},},
|
{"id":{"name":"s_node_rigidSim_object_spawner","path":"sprites/s_node_rigidSim_object_spawner/s_node_rigidSim_object_spawner.yy",},},
|
||||||
{"id":{"name":"draw_text_function","path":"scripts/draw_text_function/draw_text_function.yy",},},
|
{"id":{"name":"draw_text_function","path":"scripts/draw_text_function/draw_text_function.yy",},},
|
||||||
{"id":{"name":"o_dialog_file_name_collection","path":"objects/o_dialog_file_name_collection/o_dialog_file_name_collection.yy",},},
|
{"id":{"name":"o_dialog_file_name_collection","path":"objects/o_dialog_file_name_collection/o_dialog_file_name_collection.yy",},},
|
||||||
|
@ -842,6 +844,7 @@
|
||||||
{"id":{"name":"node_fluid_render","path":"scripts/node_fluid_render/node_fluid_render.yy",},},
|
{"id":{"name":"node_fluid_render","path":"scripts/node_fluid_render/node_fluid_render.yy",},},
|
||||||
{"id":{"name":"s_node_invert","path":"sprites/s_node_invert/s_node_invert.yy",},},
|
{"id":{"name":"s_node_invert","path":"sprites/s_node_invert/s_node_invert.yy",},},
|
||||||
{"id":{"name":"draw_text_delimiter","path":"scripts/draw_text_delimiter/draw_text_delimiter.yy",},},
|
{"id":{"name":"draw_text_delimiter","path":"scripts/draw_text_delimiter/draw_text_delimiter.yy",},},
|
||||||
|
{"id":{"name":"s_node_path_anchor","path":"sprites/s_node_path_anchor/s_node_path_anchor.yy",},},
|
||||||
{"id":{"name":"node_array_get","path":"scripts/node_array_get/node_array_get.yy",},},
|
{"id":{"name":"node_array_get","path":"scripts/node_array_get/node_array_get.yy",},},
|
||||||
{"id":{"name":"Apollo","path":"extensions/Apollo/Apollo.yy",},},
|
{"id":{"name":"Apollo","path":"extensions/Apollo/Apollo.yy",},},
|
||||||
{"id":{"name":"node_lua_compute","path":"scripts/node_lua_compute/node_lua_compute.yy",},},
|
{"id":{"name":"node_lua_compute","path":"scripts/node_lua_compute/node_lua_compute.yy",},},
|
||||||
|
@ -861,6 +864,7 @@
|
||||||
{"id":{"name":"sh_blur_radial","path":"shaders/sh_blur_radial/sh_blur_radial.yy",},},
|
{"id":{"name":"sh_blur_radial","path":"shaders/sh_blur_radial/sh_blur_radial.yy",},},
|
||||||
{"id":{"name":"node_blur","path":"scripts/node_blur/node_blur.yy",},},
|
{"id":{"name":"node_blur","path":"scripts/node_blur/node_blur.yy",},},
|
||||||
{"id":{"name":"node_iterator_each_input","path":"scripts/node_iterator_each_input/node_iterator_each_input.yy",},},
|
{"id":{"name":"node_iterator_each_input","path":"scripts/node_iterator_each_input/node_iterator_each_input.yy",},},
|
||||||
|
{"id":{"name":"sh_surface_replace_find","path":"shaders/sh_surface_replace_find/sh_surface_replace_find.yy",},},
|
||||||
{"id":{"name":"json_minify","path":"scripts/json_minify/json_minify.yy",},},
|
{"id":{"name":"json_minify","path":"scripts/json_minify/json_minify.yy",},},
|
||||||
{"id":{"name":"sh_fd_vortex","path":"shaders/sh_fd_vortex/sh_fd_vortex.yy",},},
|
{"id":{"name":"sh_fd_vortex","path":"shaders/sh_fd_vortex/sh_fd_vortex.yy",},},
|
||||||
{"id":{"name":"s_node_loop","path":"sprites/s_node_loop/s_node_loop.yy",},},
|
{"id":{"name":"s_node_loop","path":"sprites/s_node_loop/s_node_loop.yy",},},
|
||||||
|
@ -892,9 +896,11 @@
|
||||||
{"id":{"name":"s_node_random","path":"sprites/s_node_random/s_node_random.yy",},},
|
{"id":{"name":"s_node_random","path":"sprites/s_node_random/s_node_random.yy",},},
|
||||||
{"id":{"name":"s_node_color_remove","path":"sprites/s_node_color_remove/s_node_color_remove.yy",},},
|
{"id":{"name":"s_node_color_remove","path":"sprites/s_node_color_remove/s_node_color_remove.yy",},},
|
||||||
{"id":{"name":"sh_average","path":"shaders/sh_average/sh_average.yy",},},
|
{"id":{"name":"sh_average","path":"shaders/sh_average/sh_average.yy",},},
|
||||||
|
{"id":{"name":"sh_warp_4points_pers","path":"shaders/sh_warp_4points_pers/sh_warp_4points_pers.yy",},},
|
||||||
{"id":{"name":"node_mirror","path":"scripts/node_mirror/node_mirror.yy",},},
|
{"id":{"name":"node_mirror","path":"scripts/node_mirror/node_mirror.yy",},},
|
||||||
{"id":{"name":"node_corner","path":"scripts/node_corner/node_corner.yy",},},
|
{"id":{"name":"node_corner","path":"scripts/node_corner/node_corner.yy",},},
|
||||||
{"id":{"name":"vertex_function","path":"scripts/vertex_function/vertex_function.yy",},},
|
{"id":{"name":"vertex_function","path":"scripts/vertex_function/vertex_function.yy",},},
|
||||||
|
{"id":{"name":"node_path_anchor","path":"scripts/node_path_anchor/node_path_anchor.yy",},},
|
||||||
{"id":{"name":"s_node_path_wave","path":"sprites/s_node_path_wave/s_node_path_wave.yy",},},
|
{"id":{"name":"s_node_path_wave","path":"sprites/s_node_path_wave/s_node_path_wave.yy",},},
|
||||||
{"id":{"name":"string_function","path":"scripts/string_function/string_function.yy",},},
|
{"id":{"name":"string_function","path":"scripts/string_function/string_function.yy",},},
|
||||||
{"id":{"name":"o_dialog_palette","path":"objects/o_dialog_palette/o_dialog_palette.yy",},},
|
{"id":{"name":"o_dialog_palette","path":"objects/o_dialog_palette/o_dialog_palette.yy",},},
|
||||||
|
@ -1028,6 +1034,7 @@
|
||||||
{"id":{"name":"node_feedback_input","path":"scripts/node_feedback_input/node_feedback_input.yy",},},
|
{"id":{"name":"node_feedback_input","path":"scripts/node_feedback_input/node_feedback_input.yy",},},
|
||||||
{"id":{"name":"o_dialog_add_multiple_images","path":"objects/o_dialog_add_multiple_images/o_dialog_add_multiple_images.yy",},},
|
{"id":{"name":"o_dialog_add_multiple_images","path":"objects/o_dialog_add_multiple_images/o_dialog_add_multiple_images.yy",},},
|
||||||
{"id":{"name":"assets_data","path":"scripts/assets_data/assets_data.yy",},},
|
{"id":{"name":"assets_data","path":"scripts/assets_data/assets_data.yy",},},
|
||||||
|
{"id":{"name":"s_node_base_conversion","path":"sprites/s_node_base_conversion/s_node_base_conversion.yy",},},
|
||||||
{"id":{"name":"s_node_loop_array","path":"sprites/s_node_loop_array/s_node_loop_array.yy",},},
|
{"id":{"name":"s_node_loop_array","path":"sprites/s_node_loop_array/s_node_loop_array.yy",},},
|
||||||
{"id":{"name":"s_node_iterator_amount","path":"sprites/s_node_iterator_amount/s_node_iterator_amount.yy",},},
|
{"id":{"name":"s_node_iterator_amount","path":"sprites/s_node_iterator_amount/s_node_iterator_amount.yy",},},
|
||||||
{"id":{"name":"sh_color_adjust","path":"shaders/sh_color_adjust/sh_color_adjust.yy",},},
|
{"id":{"name":"sh_color_adjust","path":"shaders/sh_color_adjust/sh_color_adjust.yy",},},
|
||||||
|
@ -1049,6 +1056,7 @@
|
||||||
{"id":{"name":"sh_blend_subtract","path":"shaders/sh_blend_subtract/sh_blend_subtract.yy",},},
|
{"id":{"name":"sh_blend_subtract","path":"shaders/sh_blend_subtract/sh_blend_subtract.yy",},},
|
||||||
{"id":{"name":"o_dialog_file_name","path":"objects/o_dialog_file_name/o_dialog_file_name.yy",},},
|
{"id":{"name":"o_dialog_file_name","path":"objects/o_dialog_file_name/o_dialog_file_name.yy",},},
|
||||||
{"id":{"name":"panel_animation","path":"scripts/panel_animation/panel_animation.yy",},},
|
{"id":{"name":"panel_animation","path":"scripts/panel_animation/panel_animation.yy",},},
|
||||||
|
{"id":{"name":"node_surface_replace","path":"scripts/node_surface_replace/node_surface_replace.yy",},},
|
||||||
{"id":{"name":"node_strand_create","path":"scripts/node_strand_create/node_strand_create.yy",},},
|
{"id":{"name":"node_strand_create","path":"scripts/node_strand_create/node_strand_create.yy",},},
|
||||||
{"id":{"name":"sh_gradient","path":"shaders/sh_gradient/sh_gradient.yy",},},
|
{"id":{"name":"sh_gradient","path":"shaders/sh_gradient/sh_gradient.yy",},},
|
||||||
{"id":{"name":"node_json_file_read","path":"scripts/node_json_file_read/node_json_file_read.yy",},},
|
{"id":{"name":"node_json_file_read","path":"scripts/node_json_file_read/node_json_file_read.yy",},},
|
||||||
|
@ -1129,6 +1137,7 @@
|
||||||
{"id":{"name":"node_trigger_bool","path":"scripts/node_trigger_bool/node_trigger_bool.yy",},},
|
{"id":{"name":"node_trigger_bool","path":"scripts/node_trigger_bool/node_trigger_bool.yy",},},
|
||||||
{"id":{"name":"s_node_strandSim_gravity","path":"sprites/s_node_strandSim_gravity/s_node_strandSim_gravity.yy",},},
|
{"id":{"name":"s_node_strandSim_gravity","path":"sprites/s_node_strandSim_gravity/s_node_strandSim_gravity.yy",},},
|
||||||
{"id":{"name":"node_VFX_effect_turbulence","path":"scripts/node_VFX_effect_turbulence/node_VFX_effect_turbulence.yy",},},
|
{"id":{"name":"node_VFX_effect_turbulence","path":"scripts/node_VFX_effect_turbulence/node_VFX_effect_turbulence.yy",},},
|
||||||
|
{"id":{"name":"sh_surface_replace_replace","path":"shaders/sh_surface_replace_replace/sh_surface_replace_replace.yy",},},
|
||||||
{"id":{"name":"node_ase_file_read","path":"scripts/node_ase_file_read/node_ase_file_read.yy",},},
|
{"id":{"name":"node_ase_file_read","path":"scripts/node_ase_file_read/node_ase_file_read.yy",},},
|
||||||
{"id":{"name":"s_workshop_frame","path":"sprites/s_workshop_frame/s_workshop_frame.yy",},},
|
{"id":{"name":"s_workshop_frame","path":"sprites/s_workshop_frame/s_workshop_frame.yy",},},
|
||||||
{"id":{"name":"sh_seperate_shape_counter","path":"shaders/sh_seperate_shape_counter/sh_seperate_shape_counter.yy",},},
|
{"id":{"name":"sh_seperate_shape_counter","path":"shaders/sh_seperate_shape_counter/sh_seperate_shape_counter.yy",},},
|
||||||
|
@ -1236,6 +1245,7 @@
|
||||||
{"id":{"name":"node_mesh_to_path","path":"scripts/node_mesh_to_path/node_mesh_to_path.yy",},},
|
{"id":{"name":"node_mesh_to_path","path":"scripts/node_mesh_to_path/node_mesh_to_path.yy",},},
|
||||||
{"id":{"name":"node_fluid_sim","path":"scripts/node_fluid_sim/node_fluid_sim.yy",},},
|
{"id":{"name":"node_fluid_sim","path":"scripts/node_fluid_sim/node_fluid_sim.yy",},},
|
||||||
{"id":{"name":"sh_convolution","path":"shaders/sh_convolution/sh_convolution.yy",},},
|
{"id":{"name":"sh_convolution","path":"shaders/sh_convolution/sh_convolution.yy",},},
|
||||||
|
{"id":{"name":"number_function","path":"scripts/number_function/number_function.yy",},},
|
||||||
{"id":{"name":"s_node_array_shift","path":"sprites/s_node_array_shift/s_node_array_shift.yy",},},
|
{"id":{"name":"s_node_array_shift","path":"sprites/s_node_array_shift/s_node_array_shift.yy",},},
|
||||||
{"id":{"name":"s_node_statistic","path":"sprites/s_node_statistic/s_node_statistic.yy",},},
|
{"id":{"name":"s_node_statistic","path":"sprites/s_node_statistic/s_node_statistic.yy",},},
|
||||||
{"id":{"name":"s_node_cache_array","path":"sprites/s_node_cache_array/s_node_cache_array.yy",},},
|
{"id":{"name":"s_node_cache_array","path":"sprites/s_node_cache_array/s_node_cache_array.yy",},},
|
||||||
|
@ -1469,6 +1479,7 @@
|
||||||
{"id":{"name":"node_csv_file_read","path":"scripts/node_csv_file_read/node_csv_file_read.yy",},},
|
{"id":{"name":"node_csv_file_read","path":"scripts/node_csv_file_read/node_csv_file_read.yy",},},
|
||||||
{"id":{"name":"scrollPane","path":"scripts/scrollPane/scrollPane.yy",},},
|
{"id":{"name":"scrollPane","path":"scripts/scrollPane/scrollPane.yy",},},
|
||||||
{"id":{"name":"node_gradient_extract","path":"scripts/node_gradient_extract/node_gradient_extract.yy",},},
|
{"id":{"name":"node_gradient_extract","path":"scripts/node_gradient_extract/node_gradient_extract.yy",},},
|
||||||
|
{"id":{"name":"node_base_convert","path":"scripts/node_base_convert/node_base_convert.yy",},},
|
||||||
{"id":{"name":"s_node_normal_light","path":"sprites/s_node_normal_light/s_node_normal_light.yy",},},
|
{"id":{"name":"s_node_normal_light","path":"sprites/s_node_normal_light/s_node_normal_light.yy",},},
|
||||||
{"id":{"name":"node_transform_single","path":"scripts/node_transform_single/node_transform_single.yy",},},
|
{"id":{"name":"node_transform_single","path":"scripts/node_transform_single/node_transform_single.yy",},},
|
||||||
{"id":{"name":"node_string_length","path":"scripts/node_string_length/node_string_length.yy",},},
|
{"id":{"name":"node_string_length","path":"scripts/node_string_length/node_string_length.yy",},},
|
||||||
|
@ -1555,6 +1566,7 @@
|
||||||
{"id":{"name":"s_node_bokeh","path":"sprites/s_node_bokeh/s_node_bokeh.yy",},},
|
{"id":{"name":"s_node_bokeh","path":"sprites/s_node_bokeh/s_node_bokeh.yy",},},
|
||||||
{"id":{"name":"sh_vertex_depth_pass","path":"shaders/sh_vertex_depth_pass/sh_vertex_depth_pass.yy",},},
|
{"id":{"name":"sh_vertex_depth_pass","path":"shaders/sh_vertex_depth_pass/sh_vertex_depth_pass.yy",},},
|
||||||
{"id":{"name":"sh_curve","path":"shaders/sh_curve/sh_curve.yy",},},
|
{"id":{"name":"sh_curve","path":"shaders/sh_curve/sh_curve.yy",},},
|
||||||
|
{"id":{"name":"sh_warp_4points","path":"shaders/sh_warp_4points/sh_warp_4points.yy",},},
|
||||||
{"id":{"name":"_f_p2","path":"fonts/_f_p2/_f_p2.yy",},},
|
{"id":{"name":"_f_p2","path":"fonts/_f_p2/_f_p2.yy",},},
|
||||||
{"id":{"name":"fd_rectangle_get_pressure_iteration_type","path":"scripts/fd_rectangle_get_pressure_iteration_type/fd_rectangle_get_pressure_iteration_type.yy",},},
|
{"id":{"name":"fd_rectangle_get_pressure_iteration_type","path":"scripts/fd_rectangle_get_pressure_iteration_type/fd_rectangle_get_pressure_iteration_type.yy",},},
|
||||||
{"id":{"name":"node_text_file_write","path":"scripts/node_text_file_write/node_text_file_write.yy",},},
|
{"id":{"name":"node_text_file_write","path":"scripts/node_text_file_write/node_text_file_write.yy",},},
|
||||||
|
|
|
@ -6,7 +6,8 @@ event_inherited();
|
||||||
dialog_w = ui(648);
|
dialog_w = ui(648);
|
||||||
dialog_h = ui(640);
|
dialog_h = ui(640);
|
||||||
|
|
||||||
dialog_resizable = true;
|
draggable = false;
|
||||||
|
dialog_resizable = false;
|
||||||
dialog_w_min = ui(400);
|
dialog_w_min = ui(400);
|
||||||
dialog_h_min = ui(400);
|
dialog_h_min = ui(400);
|
||||||
dialog_w_max = WIN_W;
|
dialog_w_max = WIN_W;
|
||||||
|
@ -71,7 +72,10 @@ event_inherited();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
var spr = target.spr[index];
|
var spr = array_safe_get(target.spr, index, noone);
|
||||||
|
if(spr == noone || !sprite_exists(spr))
|
||||||
|
spr = s_texture_default;
|
||||||
|
|
||||||
var spr_w = sprite_get_width(spr);
|
var spr_w = sprite_get_width(spr);
|
||||||
var spr_h = sprite_get_height(spr);
|
var spr_h = sprite_get_height(spr);
|
||||||
var spr_s = min((ww - ui(16)) / spr_w, (hh - ui(16)) / spr_h);
|
var spr_s = min((ww - ui(16)) / spr_w, (hh - ui(16)) / spr_h);
|
||||||
|
|
|
@ -19,7 +19,8 @@
|
||||||
gameframe_caption_height_normal = ui(40);
|
gameframe_caption_height_normal = ui(40);
|
||||||
gameframe_caption_height_maximized = ui(40);
|
gameframe_caption_height_maximized = ui(40);
|
||||||
|
|
||||||
gameframe_button_array = [ game_frame_button_create("", s_kenney, 0, function() {}),
|
gameframe_button_array = [
|
||||||
|
game_frame_button_create("", s_kenney, 0, function() {}),
|
||||||
game_frame_button_create("", s_kenney, 0, function() {}),
|
game_frame_button_create("", s_kenney, 0, function() {}),
|
||||||
];
|
];
|
||||||
} else if(OS == os_macosx)
|
} else if(OS == os_macosx)
|
||||||
|
|
|
@ -1,3 +0,0 @@
|
||||||
function Script610(){
|
|
||||||
|
|
||||||
}
|
|
|
@ -29,3 +29,17 @@ function BoundingBox(minx = noone, miny = noone, maxx = noone, maxy = noone) con
|
||||||
|
|
||||||
static clone = function() { return new BoundingBox(minx, miny, maxx, maxy); }
|
static clone = function() { return new BoundingBox(minx, miny, maxx, maxy); }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function node_bbox(x0, y0, x1, y1) constructor {
|
||||||
|
self.x0 = x0;
|
||||||
|
self.x1 = x1;
|
||||||
|
self.y0 = y0;
|
||||||
|
self.y1 = y1;
|
||||||
|
|
||||||
|
xc = (x0 + x1) / 2;
|
||||||
|
yc = (y0 + y1) / 2;
|
||||||
|
w = x1 - x0;
|
||||||
|
h = y1 - y0;
|
||||||
|
|
||||||
|
static clone = function() { return node_bbox(x0, y0, x1, y1); };
|
||||||
|
}
|
|
@ -33,7 +33,7 @@
|
||||||
globalvar VERSION, SAVEFILE_VERSION, VERSION_STRING;
|
globalvar VERSION, SAVEFILE_VERSION, VERSION_STRING;
|
||||||
VERSION = 1140;
|
VERSION = 1140;
|
||||||
SAVEFILE_VERSION = 1400;
|
SAVEFILE_VERSION = 1400;
|
||||||
VERSION_STRING = "1.14.0pr6";
|
VERSION_STRING = "1.14.0pr7";
|
||||||
|
|
||||||
globalvar NODES, NODE_MAP, APPEND_MAP, HOTKEYS, HOTKEY_CONTEXT, NODE_INSTANCES;
|
globalvar NODES, NODE_MAP, APPEND_MAP, HOTKEYS, HOTKEY_CONTEXT, NODE_INSTANCES;
|
||||||
|
|
||||||
|
|
|
@ -1,3 +0,0 @@
|
||||||
function node_area611(){
|
|
||||||
|
|
||||||
}
|
|
|
@ -26,7 +26,6 @@ function Node_create_ASE_File_Read_path(_x, _y, path) {
|
||||||
function Node_ASE_File_Read(_x, _y, _group = noone) : Node(_x, _y, _group) constructor {
|
function Node_ASE_File_Read(_x, _y, _group = noone) : Node(_x, _y, _group) constructor {
|
||||||
name = "ASE File In";
|
name = "ASE File In";
|
||||||
update_on_frame = true;
|
update_on_frame = true;
|
||||||
always_output = true;
|
|
||||||
|
|
||||||
w = 128;
|
w = 128;
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
function Node_ASE_layer(_x, _y, _group = noone) : Node(_x, _y, _group) constructor {
|
function Node_ASE_layer(_x, _y, _group = noone) : Node(_x, _y, _group) constructor {
|
||||||
name = "ASE Layer";
|
name = "ASE Layer";
|
||||||
update_on_frame = true;
|
update_on_frame = true;
|
||||||
always_output = true;
|
|
||||||
previewable = false;
|
previewable = false;
|
||||||
|
|
||||||
inputs[| 0] = nodeValue("ASE data", self, JUNCTION_CONNECT.input, VALUE_TYPE.object, noone)
|
inputs[| 0] = nodeValue("ASE data", self, JUNCTION_CONNECT.input, VALUE_TYPE.object, noone)
|
||||||
|
|
38
scripts/node_base_convert/node_base_convert.gml
Normal file
38
scripts/node_base_convert/node_base_convert.gml
Normal file
|
@ -0,0 +1,38 @@
|
||||||
|
function Node_Base_Convert(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor {
|
||||||
|
name = "Convert Base";
|
||||||
|
color = COLORS.node_blend_number;
|
||||||
|
previewable = false;
|
||||||
|
|
||||||
|
w = 96;
|
||||||
|
|
||||||
|
inputs[| 0] = nodeValue("Value", self, JUNCTION_CONNECT.input, VALUE_TYPE.text, "")
|
||||||
|
.setVisible(true, true);
|
||||||
|
|
||||||
|
inputs[| 1] = nodeValue("Base from", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 10);
|
||||||
|
|
||||||
|
inputs[| 2] = nodeValue("Base to", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 10);
|
||||||
|
|
||||||
|
outputs[| 0] = nodeValue("Result", self, JUNCTION_CONNECT.output, VALUE_TYPE.text, "");
|
||||||
|
|
||||||
|
function process_data(_output, _data, _output_index, _array_index = 0) {
|
||||||
|
var val = _data[0];
|
||||||
|
var bFrom = max(2, _data[1]);
|
||||||
|
var bTo = max(2, _data[2]);
|
||||||
|
|
||||||
|
return convertBase(val, bFrom, bTo);
|
||||||
|
}
|
||||||
|
|
||||||
|
static onDrawNode = function(xx, yy, _mx, _my, _s, _hover, _focus) {
|
||||||
|
draw_set_text(f_h5, fa_center, fa_center, COLORS._main_text);
|
||||||
|
var baseFrom = current_data[1];
|
||||||
|
var baseTo = current_data[2];
|
||||||
|
|
||||||
|
var bbox = drawGetBbox(xx, yy, _s);
|
||||||
|
var b1 = new node_bbox(bbox.x0, bbox.y0, bbox.xc - _s * 8, bbox.y1);
|
||||||
|
var b2 = new node_bbox(bbox.xc + _s * 8, bbox.y0, bbox.x1, bbox.y1);
|
||||||
|
|
||||||
|
draw_sprite_ext(THEME.arrow, 0, bbox.xc, bbox.yc + 1 * _s, .5 * _s, .5 * _s, 0, COLORS._main_icon, 1);
|
||||||
|
draw_text_bbox(b1, baseFrom);
|
||||||
|
draw_text_bbox(b2, baseTo);
|
||||||
|
}
|
||||||
|
}
|
11
scripts/node_base_convert/node_base_convert.yy
Normal file
11
scripts/node_base_convert/node_base_convert.yy
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
{
|
||||||
|
"resourceType": "GMScript",
|
||||||
|
"resourceVersion": "1.0",
|
||||||
|
"name": "node_base_convert",
|
||||||
|
"isCompatibility": false,
|
||||||
|
"isDnD": false,
|
||||||
|
"parent": {
|
||||||
|
"name": "number",
|
||||||
|
"path": "folders/nodes/data/value/number.yy",
|
||||||
|
},
|
||||||
|
}
|
|
@ -44,6 +44,8 @@ function Node_Bevel(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) con
|
||||||
attribute_oversample();
|
attribute_oversample();
|
||||||
|
|
||||||
static drawOverlay = function(active, _x, _y, _s, _mx, _my, _snx, _sny) {
|
static drawOverlay = function(active, _x, _y, _s, _mx, _my, _snx, _sny) {
|
||||||
|
PROCESSOR_OVERLAY_CHECK
|
||||||
|
|
||||||
var _surf = current_data[0];
|
var _surf = current_data[0];
|
||||||
if(!is_surface(_surf)) return;
|
if(!is_surface(_surf)) return;
|
||||||
|
|
||||||
|
|
|
@ -142,13 +142,14 @@ function Node_Collection(_x, _y, _group = noone) : Node(_x, _y, _group) construc
|
||||||
if(!_in.renderActive) continue;
|
if(!_in.renderActive) continue;
|
||||||
|
|
||||||
array_push(nodes, _in);
|
array_push(nodes, _in);
|
||||||
printIf(global.RENDER_LOG, "Push group input " + _in.name + " to stack");
|
printIf(global.RENDER_LOG, " >> Check complete, push " + _in.name + " to stack.");
|
||||||
}
|
}
|
||||||
|
|
||||||
return nodes;
|
return nodes;
|
||||||
}
|
}
|
||||||
|
|
||||||
static setRenderStatus = function(result) {
|
static setRenderStatus = function(result) {
|
||||||
|
printIf(global.RENDER_LOG, " >> Set render status for " + name + " : " + string(result));
|
||||||
rendered = result;
|
rendered = result;
|
||||||
|
|
||||||
if(result) {
|
if(result) {
|
||||||
|
|
|
@ -21,15 +21,19 @@ function Node_Condition(_x, _y, _group = noone) : Node(_x, _y, _group) construct
|
||||||
.setVisible(true, true);
|
.setVisible(true, true);
|
||||||
|
|
||||||
inputs[| 5] = nodeValue("Eval mode", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0 )
|
inputs[| 5] = nodeValue("Eval mode", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0 )
|
||||||
.setDisplay(VALUE_DISPLAY.enum_scroll, ["Boolean", "Comparison"])
|
.setDisplay(VALUE_DISPLAY.enum_scroll, ["Boolean", "Number compare", "Text compare" ])
|
||||||
.rejectArray();
|
.rejectArray();
|
||||||
|
|
||||||
inputs[| 6] = nodeValue("Boolean", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, false )
|
inputs[| 6] = nodeValue("Boolean", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, false )
|
||||||
.setVisible(true, true)
|
.setVisible(true, true)
|
||||||
.rejectArray();
|
.rejectArray();
|
||||||
|
|
||||||
|
inputs[| 7] = nodeValue("Text 1", self, JUNCTION_CONNECT.input, VALUE_TYPE.text, "" );
|
||||||
|
|
||||||
|
inputs[| 8] = nodeValue("Text 2", self, JUNCTION_CONNECT.input, VALUE_TYPE.text, "" );
|
||||||
|
|
||||||
input_display_list = [ 5,
|
input_display_list = [ 5,
|
||||||
["Condition", false], 0, 1, 2, 6,
|
["Condition", false], 0, 1, 2, 6, 7, 8,
|
||||||
["Result", true], 3, 4
|
["Result", true], 3, 4
|
||||||
]
|
]
|
||||||
|
|
||||||
|
@ -39,10 +43,12 @@ function Node_Condition(_x, _y, _group = noone) : Node(_x, _y, _group) construct
|
||||||
static step = function() {
|
static step = function() {
|
||||||
var _mode = inputs[| 5].getValue();
|
var _mode = inputs[| 5].getValue();
|
||||||
|
|
||||||
inputs[| 0].setVisible(_mode);
|
inputs[| 0].setVisible(_mode == 1, _mode == 1);
|
||||||
inputs[| 1].setVisible(_mode);
|
inputs[| 1].setVisible(_mode == 1);
|
||||||
inputs[| 2].setVisible(_mode);
|
inputs[| 2].setVisible(_mode == 1, _mode == 1);
|
||||||
inputs[| 6].setVisible(!_mode);
|
inputs[| 6].setVisible(_mode == 0, _mode == 0);
|
||||||
|
inputs[| 7].setVisible(_mode == 2, _mode == 2);
|
||||||
|
inputs[| 8].setVisible(_mode == 2, _mode == 2);
|
||||||
}
|
}
|
||||||
|
|
||||||
static update = function(frame = ANIMATOR.current_frame) {
|
static update = function(frame = ANIMATOR.current_frame) {
|
||||||
|
@ -55,23 +61,28 @@ function Node_Condition(_x, _y, _group = noone) : Node(_x, _y, _group) construct
|
||||||
var _cond = inputs[| 1].getValue();
|
var _cond = inputs[| 1].getValue();
|
||||||
var _valu = inputs[| 2].getValue();
|
var _valu = inputs[| 2].getValue();
|
||||||
var _bool = inputs[| 6].getValue();
|
var _bool = inputs[| 6].getValue();
|
||||||
|
var _txt1 = inputs[| 7].getValue();
|
||||||
|
var _txt2 = inputs[| 8].getValue();
|
||||||
|
|
||||||
inputs[| 3].type = inputs[| 3].value_from == noone? VALUE_TYPE.any : inputs[| 3].value_from.type;
|
inputs[| 3].type = inputs[| 3].value_from == noone? VALUE_TYPE.any : inputs[| 3].value_from.type;
|
||||||
inputs[| 4].type = inputs[| 4].value_from == noone? VALUE_TYPE.any : inputs[| 4].value_from.type;
|
inputs[| 4].type = inputs[| 4].value_from == noone? VALUE_TYPE.any : inputs[| 4].value_from.type;
|
||||||
|
|
||||||
var res = false;
|
var res = false;
|
||||||
|
|
||||||
if(_mode) {
|
switch(_mode) {
|
||||||
switch(_cond) {
|
case 0 : res = _bool; break;
|
||||||
case 0 : res = _chck == _valu; break;
|
case 1 :
|
||||||
case 1 : res = _chck != _valu; break;
|
switch(_cond) {
|
||||||
case 2 : res = _chck < _valu; break;
|
case 0 : res = _chck == _valu; break;
|
||||||
case 3 : res = _chck <= _valu; break;
|
case 1 : res = _chck != _valu; break;
|
||||||
case 4 : res = _chck > _valu; break;
|
case 2 : res = _chck < _valu; break;
|
||||||
case 5 : res = _chck >= _valu; break;
|
case 3 : res = _chck <= _valu; break;
|
||||||
}
|
case 4 : res = _chck > _valu; break;
|
||||||
} else
|
case 5 : res = _chck >= _valu; break;
|
||||||
res = _bool;
|
}
|
||||||
|
break;
|
||||||
|
case 2 : res = _txt1 == _txt2; break;
|
||||||
|
}
|
||||||
|
|
||||||
if(res) {
|
if(res) {
|
||||||
outputs[| 0].setValue(_true);
|
outputs[| 0].setValue(_true);
|
||||||
|
|
|
@ -53,7 +53,6 @@ function Node(_x, _y, _group = PANEL_GRAPH.getCurrentContext()) : __Node_Base(_x
|
||||||
show_input_name = false;
|
show_input_name = false;
|
||||||
show_output_name = false;
|
show_output_name = false;
|
||||||
|
|
||||||
always_output = false;
|
|
||||||
inspecting = false;
|
inspecting = false;
|
||||||
previewing = 0;
|
previewing = 0;
|
||||||
|
|
||||||
|
@ -248,24 +247,6 @@ function Node(_x, _y, _group = PANEL_GRAPH.getCurrentContext()) : __Node_Base(_x
|
||||||
if(use_cache) cacheArrayCheck();
|
if(use_cache) cacheArrayCheck();
|
||||||
var willUpdate = false;
|
var willUpdate = false;
|
||||||
|
|
||||||
if(always_output) {
|
|
||||||
for(var i = 0; i < ds_list_size(outputs); i++) {
|
|
||||||
if(outputs[| i].type != VALUE_TYPE.surface)
|
|
||||||
continue;
|
|
||||||
var val = outputs[| i].getValue();
|
|
||||||
|
|
||||||
if(is_array(val)) {
|
|
||||||
for(var j = 0; j < array_length(val); j++) {
|
|
||||||
var _surf = val[j];
|
|
||||||
if(is_surface(_surf) && _surf != DEF_SURFACE)
|
|
||||||
continue;
|
|
||||||
willUpdate = true;
|
|
||||||
}
|
|
||||||
} else if(!is_surface(val) || val == DEF_SURFACE)
|
|
||||||
willUpdate = true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if(ANIMATOR.frame_progress) {
|
if(ANIMATOR.frame_progress) {
|
||||||
if(update_on_frame)
|
if(update_on_frame)
|
||||||
willUpdate = true;
|
willUpdate = true;
|
||||||
|
@ -350,7 +331,7 @@ function Node(_x, _y, _group = PANEL_GRAPH.getCurrentContext()) : __Node_Base(_x
|
||||||
nodes[i].triggerRender();
|
nodes[i].triggerRender();
|
||||||
}
|
}
|
||||||
|
|
||||||
static isRenderable = function() { //Check if every input is ready (updated)
|
static isRenderable = function(log = false) { //Check if every input is ready (updated)
|
||||||
if(!active) return false;
|
if(!active) return false;
|
||||||
if(!renderActive) return false;
|
if(!renderActive) return false;
|
||||||
|
|
||||||
|
@ -360,8 +341,8 @@ function Node(_x, _y, _group = PANEL_GRAPH.getCurrentContext()) : __Node_Base(_x
|
||||||
if( _in.type == VALUE_TYPE.node) continue;
|
if( _in.type == VALUE_TYPE.node) continue;
|
||||||
|
|
||||||
var val_from = _in.value_from;
|
var val_from = _in.value_from;
|
||||||
if( val_from == noone) continue;
|
if( val_from == noone) continue;
|
||||||
if(!val_from.node.active) continue;
|
if(!val_from.node.active) continue;
|
||||||
if(!val_from.node.renderActive) continue;
|
if(!val_from.node.renderActive) continue;
|
||||||
if(!val_from.node.rendered)
|
if(!val_from.node.rendered)
|
||||||
return false;
|
return false;
|
||||||
|
@ -380,10 +361,10 @@ function Node(_x, _y, _group = PANEL_GRAPH.getCurrentContext()) : __Node_Base(_x
|
||||||
var _to = _ot.value_to[| j];
|
var _to = _ot.value_to[| j];
|
||||||
if(!_to.node.active || _to.value_from == noone) continue;
|
if(!_to.node.active || _to.value_from == noone) continue;
|
||||||
|
|
||||||
printIf(global.RENDER_LOG, " -> Check render " + _to.node.name + " from " + _to.value_from.node.name);
|
printIf(global.RENDER_LOG, " |--> Check render " + _to.node.name + " from " + _to.value_from.node.name);
|
||||||
if(_to.value_from.node != self) continue;
|
if(_to.value_from.node != self) continue;
|
||||||
|
|
||||||
printIf(global.RENDER_LOG, " --> Check complete, push " + _to.node.name + " to stack.");
|
printIf(global.RENDER_LOG, " >> Check complete, push " + _to.node.name + " to stack.");
|
||||||
array_push(nodes, _to.node);
|
array_push(nodes, _to.node);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -394,6 +375,7 @@ function Node(_x, _y, _group = PANEL_GRAPH.getCurrentContext()) : __Node_Base(_x
|
||||||
static onInspect = function() {}
|
static onInspect = function() {}
|
||||||
|
|
||||||
static setRenderStatus = function(result) {
|
static setRenderStatus = function(result) {
|
||||||
|
printIf(global.RENDER_LOG, " >> Set render status for " + name + " : " + string(result));
|
||||||
rendered = result;
|
rendered = result;
|
||||||
|
|
||||||
if(!result && group != noone)
|
if(!result && group != noone)
|
||||||
|
@ -466,15 +448,7 @@ function Node(_x, _y, _group = PANEL_GRAPH.getCurrentContext()) : __Node_Base(_x
|
||||||
var y0 = yy + 20 * draw_name + draw_padding * _s;
|
var y0 = yy + 20 * draw_name + draw_padding * _s;
|
||||||
var y1 = yy + (h - draw_padding) * _s;
|
var y1 = yy + (h - draw_padding) * _s;
|
||||||
|
|
||||||
return { x0 : x0,
|
return new node_bbox(x0, y0, x1, y1);
|
||||||
x1 : x1,
|
|
||||||
y0 : y0,
|
|
||||||
y1 : y1,
|
|
||||||
xc : (x0 + x1) / 2,
|
|
||||||
yc : (y0 + y1) / 2,
|
|
||||||
w : x1 - x0,
|
|
||||||
h : y1 - y0
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static drawNodeName = function(xx, yy, _s) {
|
static drawNodeName = function(xx, yy, _s) {
|
||||||
|
@ -490,7 +464,7 @@ function Node(_x, _y, _group = PANEL_GRAPH.getCurrentContext()) : __Node_Base(_x
|
||||||
draw_sprite_stretched_ext(THEME.node_bg_name, 0, xx, yy, w * _s, ui(20), color, aa);
|
draw_sprite_stretched_ext(THEME.node_bg_name, 0, xx, yy, w * _s, ui(20), color, aa);
|
||||||
|
|
||||||
var cc = COLORS._main_text;
|
var cc = COLORS._main_text;
|
||||||
if(PREF_MAP[? "node_show_render_status"] && !rendered)
|
if(/*PREF_MAP[? "node_show_render_status"] && */!rendered)
|
||||||
cc = isRenderable()? COLORS._main_value_positive : COLORS._main_value_negative;
|
cc = isRenderable()? COLORS._main_value_positive : COLORS._main_value_negative;
|
||||||
|
|
||||||
draw_set_text(f_p1, fa_left, fa_center, cc);
|
draw_set_text(f_p1, fa_left, fa_center, cc);
|
||||||
|
|
|
@ -27,7 +27,6 @@ function Node_create_Display_Image_path(_x, _y, path) {
|
||||||
|
|
||||||
function Node_Display_Image(_x, _y, _group = noone) : Node(_x, _y, _group) constructor {
|
function Node_Display_Image(_x, _y, _group = noone) : Node(_x, _y, _group) constructor {
|
||||||
name = "";
|
name = "";
|
||||||
always_output = true;
|
|
||||||
auto_height = false;
|
auto_height = false;
|
||||||
|
|
||||||
inputs[| 0] = nodeValue("Path", self, JUNCTION_CONNECT.input, VALUE_TYPE.path, "")
|
inputs[| 0] = nodeValue("Path", self, JUNCTION_CONNECT.input, VALUE_TYPE.path, "")
|
||||||
|
|
|
@ -26,31 +26,29 @@ function Node_Group_Output(_x, _y, _group = noone) : Node(_x, _y, _group) constr
|
||||||
|
|
||||||
static getNextNodes = function() {
|
static getNextNodes = function() {
|
||||||
if(is_undefined(outParent)) return [];
|
if(is_undefined(outParent)) return [];
|
||||||
group.setRenderStatus(true);
|
//group.setRenderStatus(true);
|
||||||
//printIf(global.RENDER_LOG, "Value to amount " + string(ds_list_size(outParent.value_to)));
|
//printIf(global.RENDER_LOG, "Value to amount " + string(ds_list_size(outParent.value_to)));
|
||||||
|
|
||||||
var nodes = [];
|
var nodes = [];
|
||||||
for(var j = 0; j < ds_list_size(outParent.value_to); j++) {
|
for(var j = 0; j < ds_list_size(outParent.value_to); j++) {
|
||||||
var _to = outParent.value_to[| j];
|
var _to = outParent.value_to[| j];
|
||||||
if(!_to.node.renderActive) continue;
|
if(!_to.node.renderActive) continue;
|
||||||
printIf(global.RENDER_LOG, "Value to " + _to.name);
|
//printIf(global.RENDER_LOG, "Value to " + _to.name);
|
||||||
|
|
||||||
if(!_to.node.active || _to.value_from == noone) {
|
if(!_to.node.active || _to.value_from == noone) {
|
||||||
printIf(global.RENDER_LOG, "no value from");
|
//printIf(global.RENDER_LOG, "no value from");
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(_to.value_from.node != group) {
|
if(_to.value_from.node != group) {
|
||||||
printIf(global.RENDER_LOG, "value from not equal group");
|
//printIf(global.RENDER_LOG, "value from not equal group");
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
printIf(global.RENDER_LOG, "Group output ready " + string(_to.node.isRenderable()));
|
//printIf(global.RENDER_LOG, "Group output ready " + string(_to.node.isRenderable()));
|
||||||
|
|
||||||
if(_to.node.isRenderable()) {
|
array_push(nodes, _to.node);
|
||||||
array_push(nodes, _to.node);
|
printIf(global.RENDER_LOG, " >> Check complete, push " + _to.node.name + " to stack.");
|
||||||
printIf(global.RENDER_LOG, "Push node " + _to.node.name + " to stack");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return nodes;
|
return nodes;
|
||||||
|
|
|
@ -24,7 +24,6 @@ function Node_create_Image_path(_x, _y, path) {
|
||||||
function Node_Image(_x, _y, _group = noone) : Node(_x, _y, _group) constructor {
|
function Node_Image(_x, _y, _group = noone) : Node(_x, _y, _group) constructor {
|
||||||
name = "Image";
|
name = "Image";
|
||||||
color = COLORS.node_blend_input;
|
color = COLORS.node_blend_input;
|
||||||
always_output = true;
|
|
||||||
|
|
||||||
inputs[| 0] = nodeValue("Path", self, JUNCTION_CONNECT.input, VALUE_TYPE.path, "")
|
inputs[| 0] = nodeValue("Path", self, JUNCTION_CONNECT.input, VALUE_TYPE.path, "")
|
||||||
.setDisplay(VALUE_DISPLAY.path_load, ["*.png", ""])
|
.setDisplay(VALUE_DISPLAY.path_load, ["*.png", ""])
|
||||||
|
|
|
@ -38,7 +38,6 @@ function Node_Image_Animated(_x, _y, _group = noone) : Node(_x, _y, _group) cons
|
||||||
color = COLORS.node_blend_input;
|
color = COLORS.node_blend_input;
|
||||||
|
|
||||||
update_on_frame = true;
|
update_on_frame = true;
|
||||||
always_output = true;
|
|
||||||
|
|
||||||
inputs[| 0] = nodeValue("Path", self, JUNCTION_CONNECT.input, VALUE_TYPE.path, [])
|
inputs[| 0] = nodeValue("Path", self, JUNCTION_CONNECT.input, VALUE_TYPE.path, [])
|
||||||
.setDisplay(VALUE_DISPLAY.path_array, ["*.png", ""]);
|
.setDisplay(VALUE_DISPLAY.path_array, ["*.png", ""]);
|
||||||
|
|
|
@ -29,7 +29,6 @@ function Node_Image_gif(_x, _y, _group = noone) : Node(_x, _y, _group) construct
|
||||||
name = "Image GIF";
|
name = "Image GIF";
|
||||||
color = COLORS.node_blend_input;
|
color = COLORS.node_blend_input;
|
||||||
update_on_frame = true;
|
update_on_frame = true;
|
||||||
always_output = true;
|
|
||||||
|
|
||||||
inputs[| 0] = nodeValue("Path", self, JUNCTION_CONNECT.input, VALUE_TYPE.path, "")
|
inputs[| 0] = nodeValue("Path", self, JUNCTION_CONNECT.input, VALUE_TYPE.path, "")
|
||||||
.setDisplay(VALUE_DISPLAY.path_load, ["*.gif", ""]);
|
.setDisplay(VALUE_DISPLAY.path_load, ["*.gif", ""]);
|
||||||
|
|
|
@ -35,7 +35,6 @@ function Node_Image_Sequence(_x, _y, _group = noone) : Node(_x, _y, _group) cons
|
||||||
name = "Image Array";
|
name = "Image Array";
|
||||||
spr = [];
|
spr = [];
|
||||||
color = COLORS.node_blend_input;
|
color = COLORS.node_blend_input;
|
||||||
always_output = true;
|
|
||||||
|
|
||||||
inputs[| 0] = nodeValue("Path", self, JUNCTION_CONNECT.input, VALUE_TYPE.path, [])
|
inputs[| 0] = nodeValue("Path", self, JUNCTION_CONNECT.input, VALUE_TYPE.path, [])
|
||||||
.setDisplay(VALUE_DISPLAY.path_array, ["*.png", ""]);
|
.setDisplay(VALUE_DISPLAY.path_array, ["*.png", ""]);
|
||||||
|
@ -135,6 +134,8 @@ function Node_Image_Sequence(_x, _y, _group = noone) : Node(_x, _y, _group) cons
|
||||||
var _ww = -1, _hh = -1;
|
var _ww = -1, _hh = -1;
|
||||||
|
|
||||||
var surfs = outputs[| 0].getValue();
|
var surfs = outputs[| 0].getValue();
|
||||||
|
surface_array_free(surfs);
|
||||||
|
surfs = [];
|
||||||
|
|
||||||
for(var i = 0; i < array_length(spr); i++) {
|
for(var i = 0; i < array_length(spr); i++) {
|
||||||
var _spr = spr[i];
|
var _spr = spr[i];
|
||||||
|
@ -168,7 +169,7 @@ function Node_Image_Sequence(_x, _y, _group = noone) : Node(_x, _y, _group) cons
|
||||||
ww = sprite_get_width(_spr) + pad[0] + pad[2];
|
ww = sprite_get_width(_spr) + pad[0] + pad[2];
|
||||||
hh = sprite_get_height(_spr) + pad[1] + pad[3];
|
hh = sprite_get_height(_spr) + pad[1] + pad[3];
|
||||||
|
|
||||||
surfs[i] = surface_verify(array_safe_get(surfs, i), ww, hh, attrDepth());
|
surfs[i] = surface_create(ww, hh, attrDepth());
|
||||||
surface_set_target(surfs[i]);
|
surface_set_target(surfs[i]);
|
||||||
DRAW_CLEAR
|
DRAW_CLEAR
|
||||||
BLEND_OVERRIDE;
|
BLEND_OVERRIDE;
|
||||||
|
@ -178,7 +179,7 @@ function Node_Image_Sequence(_x, _y, _group = noone) : Node(_x, _y, _group) cons
|
||||||
break;
|
break;
|
||||||
case CANVAS_SIZE.maximum :
|
case CANVAS_SIZE.maximum :
|
||||||
case CANVAS_SIZE.minimum :
|
case CANVAS_SIZE.minimum :
|
||||||
surfs[i] = surface_verify(array_safe_get(surfs, i), ww, hh, attrDepth());
|
surfs[i] = surface_create(ww, hh, attrDepth());
|
||||||
var _w = sprite_get_width(_spr);
|
var _w = sprite_get_width(_spr);
|
||||||
var _h = sprite_get_height(_spr);
|
var _h = sprite_get_height(_spr);
|
||||||
|
|
||||||
|
|
|
@ -1,3 +0,0 @@
|
||||||
function node_lerp609(){
|
|
||||||
|
|
||||||
}
|
|
|
@ -149,34 +149,48 @@ function Node_Path(_x, _y, _group = noone) : Node(_x, _y, _group) constructor {
|
||||||
if(drag_type < 2) {
|
if(drag_type < 2) {
|
||||||
var inp = inputs[| input_fix_len + drag_point];
|
var inp = inputs[| input_fix_len + drag_point];
|
||||||
var anc = inp.getValue();
|
var anc = inp.getValue();
|
||||||
if(drag_type == 0) {
|
if(drag_type == 0) { //drag point
|
||||||
anc[0] = dx;
|
anc[0] = dx;
|
||||||
anc[1] = dy;
|
anc[1] = dy;
|
||||||
if(key_mod_press(CTRL)) {
|
if(key_mod_press(CTRL)) {
|
||||||
anc[0] = round(anc[0]);
|
anc[0] = round(anc[0]);
|
||||||
anc[1] = round(anc[1]);
|
anc[1] = round(anc[1]);
|
||||||
}
|
}
|
||||||
} else if(drag_type == 1) {
|
} else if(drag_type == 1) { //drag control 1
|
||||||
anc[2] = dx - anc[0];
|
anc[2] = dx - anc[0];
|
||||||
anc[3] = dy - anc[1];
|
anc[3] = dy - anc[1];
|
||||||
anc[4] = -anc[2];
|
|
||||||
anc[5] = -anc[3];
|
if(!key_mod_press(SHIFT)) {
|
||||||
|
anc[4] = -anc[2];
|
||||||
|
anc[5] = -anc[3];
|
||||||
|
}
|
||||||
|
|
||||||
if(key_mod_press(CTRL)) {
|
if(key_mod_press(CTRL)) {
|
||||||
anc[2] = round(anc[2]);
|
anc[2] = round(anc[2]);
|
||||||
anc[3] = round(anc[3]);
|
anc[3] = round(anc[3]);
|
||||||
anc[4] = round(anc[4]);
|
|
||||||
anc[5] = round(anc[5]);
|
if(key_mod_press(SHIFT)) {
|
||||||
|
anc[4] = round(anc[4]);
|
||||||
|
anc[5] = round(anc[5]);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} else if(drag_type == -1) {
|
} else if(drag_type == -1) { //drag control 2
|
||||||
anc[4] = dx - anc[0];
|
anc[4] = dx - anc[0];
|
||||||
anc[5] = dy - anc[1];
|
anc[5] = dy - anc[1];
|
||||||
anc[2] = -anc[4];
|
|
||||||
anc[3] = -anc[5];
|
if(!key_mod_press(SHIFT)) {
|
||||||
|
anc[2] = -anc[4];
|
||||||
|
anc[3] = -anc[5];
|
||||||
|
}
|
||||||
|
|
||||||
if(key_mod_press(CTRL)) {
|
if(key_mod_press(CTRL)) {
|
||||||
anc[2] = round(anc[2]);
|
anc[2] = round(anc[2]);
|
||||||
anc[3] = round(anc[3]);
|
anc[3] = round(anc[3]);
|
||||||
anc[4] = round(anc[4]);
|
|
||||||
anc[5] = round(anc[5]);
|
if(!key_mod_press(SHIFT)) {
|
||||||
|
anc[4] = round(anc[4]);
|
||||||
|
anc[5] = round(anc[5]);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -563,7 +577,7 @@ function Node_Path(_x, _y, _group = noone) : Node(_x, _y, _group) constructor {
|
||||||
drag_point_sy = _a[1];
|
drag_point_sy = _a[1];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else if(key_mod_press(SHIFT)) {
|
} else if(hover_type == 0 && key_mod_press(SHIFT)) {
|
||||||
draw_sprite_ui_uniform(THEME.cursor_path_remove, 0, _mx + 16, _my + 16);
|
draw_sprite_ui_uniform(THEME.cursor_path_remove, 0, _mx + 16, _my + 16);
|
||||||
|
|
||||||
if(mouse_press(mb_left, active)) {
|
if(mouse_press(mb_left, active)) {
|
||||||
|
|
66
scripts/node_path_anchor/node_path_anchor.gml
Normal file
66
scripts/node_path_anchor/node_path_anchor.gml
Normal file
|
@ -0,0 +1,66 @@
|
||||||
|
function Node_Path_Anchor(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor {
|
||||||
|
name = "Path Anchor";
|
||||||
|
color = COLORS.node_blend_number;
|
||||||
|
previewable = false;
|
||||||
|
w = 96;
|
||||||
|
|
||||||
|
inputs[| 0] = nodeValue("Postion", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 0, 0 ] )
|
||||||
|
.setDisplay(VALUE_DISPLAY.vector)
|
||||||
|
.setVisible(true, true);
|
||||||
|
|
||||||
|
inputs[| 1] = nodeValue("Control point 1", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ -16, 0 ] )
|
||||||
|
.setDisplay(VALUE_DISPLAY.vector);
|
||||||
|
|
||||||
|
inputs[| 2] = nodeValue("Control point 2", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 16, 0 ] )
|
||||||
|
.setDisplay(VALUE_DISPLAY.vector);
|
||||||
|
|
||||||
|
inputs[| 3] = nodeValue("Mirror control point", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, false );
|
||||||
|
|
||||||
|
outputs[| 0] = nodeValue("Anchor", self, JUNCTION_CONNECT.output, VALUE_TYPE.float, [ 0, 0, 0, 0, 0, 0 ])
|
||||||
|
.setDisplay(VALUE_DISPLAY.vector);
|
||||||
|
|
||||||
|
tools = [
|
||||||
|
new NodeTool( "Adjust control point", THEME.path_tools_anchor ),
|
||||||
|
];
|
||||||
|
|
||||||
|
static drawOverlay = function(active, _x, _y, _s, _mx, _my, _snx, _sny) {
|
||||||
|
var _pos = inputs[| 0].getValue();
|
||||||
|
var _cn1 = inputs[| 1].getValue();
|
||||||
|
var _cn2 = inputs[| 2].getValue();
|
||||||
|
var _mir = inputs[| 3].getValue();
|
||||||
|
|
||||||
|
var px = _x + _pos[0] * _s;
|
||||||
|
var py = _y + _pos[1] * _s;
|
||||||
|
|
||||||
|
var c1x = px + _cn1[0] * _s;
|
||||||
|
var c1y = py + _cn1[1] * _s;
|
||||||
|
var c2x = _mir? px - _cn1[0] * _s : px + _cn2[0] * _s;
|
||||||
|
var c2y = _mir? py - _cn1[1] * _s : py + _cn2[1] * _s;
|
||||||
|
|
||||||
|
draw_set_color(COLORS._main_accent);
|
||||||
|
draw_line(px, py, c1x, c1y);
|
||||||
|
draw_line(px, py, c2x, c2y);
|
||||||
|
|
||||||
|
active &= !inputs[| 0].drawOverlay(!isUsingTool(0) && active, _x, _y, _s, _mx, _my, _snx, _sny);
|
||||||
|
active &= !inputs[| 1].drawOverlay(active, px, py, _s, _mx, _my, _snx, _sny);
|
||||||
|
|
||||||
|
if(!_mir)
|
||||||
|
active &= !inputs[| 2].drawOverlay(active, px, py, _s, _mx, _my, _snx, _sny);
|
||||||
|
else
|
||||||
|
draw_circle(c2x, c2y, 4, false);
|
||||||
|
}
|
||||||
|
|
||||||
|
function process_data(_output, _data, _output_index, _array_index = 0) {
|
||||||
|
var _mir = _data[3];
|
||||||
|
|
||||||
|
if(_mir)
|
||||||
|
return [_data[0][0], _data[0][1], _data[1][0], _data[1][1], -_data[1][0], -_data[1][1]];
|
||||||
|
else
|
||||||
|
return [_data[0][0], _data[0][1], _data[1][0], _data[1][1], _data[2][0], _data[2][1]];
|
||||||
|
}
|
||||||
|
|
||||||
|
static onDrawNode = function(xx, yy, _mx, _my, _s, _hover, _focus) {
|
||||||
|
var bbox = drawGetBbox(xx, yy, _s);
|
||||||
|
draw_sprite_fit(s_node_path_anchor, 0, bbox.xc, bbox.yc, bbox.w, bbox.h);
|
||||||
|
}
|
||||||
|
}
|
11
scripts/node_path_anchor/node_path_anchor.yy
Normal file
11
scripts/node_path_anchor/node_path_anchor.yy
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
{
|
||||||
|
"resourceType": "GMScript",
|
||||||
|
"resourceVersion": "1.0",
|
||||||
|
"name": "node_path_anchor",
|
||||||
|
"isCompatibility": false,
|
||||||
|
"isDnD": false,
|
||||||
|
"parent": {
|
||||||
|
"name": "path",
|
||||||
|
"path": "folders/nodes/data/value/path.yy",
|
||||||
|
},
|
||||||
|
}
|
|
@ -61,7 +61,7 @@ function Node_Path_Array(_x, _y, _group = noone) : Node(_x, _y, _group) construc
|
||||||
var _path = inputs[| i].getValue();
|
var _path = inputs[| i].getValue();
|
||||||
var lc = struct_has(_path, "getLineCount")? _path.getLineCount() : 1;
|
var lc = struct_has(_path, "getLineCount")? _path.getLineCount() : 1;
|
||||||
|
|
||||||
if(ind < lc) return _path.getLength(ind).clone();
|
if(ind < lc) return _path.getLength(ind);
|
||||||
ind -= lc;
|
ind -= lc;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -73,7 +73,7 @@ function Node_Path_Array(_x, _y, _group = noone) : Node(_x, _y, _group) construc
|
||||||
var _path = inputs[| i].getValue();
|
var _path = inputs[| i].getValue();
|
||||||
var lc = struct_has(_path, "getLineCount")? _path.getLineCount() : 1;
|
var lc = struct_has(_path, "getLineCount")? _path.getLineCount() : 1;
|
||||||
|
|
||||||
if(ind < lc) return _path.getBoundary(ind).clone();
|
if(ind < lc) return _path.getBoundary(ind);
|
||||||
ind -= lc;
|
ind -= lc;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -85,7 +85,7 @@ function Node_Path_Array(_x, _y, _group = noone) : Node(_x, _y, _group) construc
|
||||||
var _path = inputs[| i].getValue();
|
var _path = inputs[| i].getValue();
|
||||||
var lc = struct_has(_path, "getLineCount")? _path.getLineCount() : 1;
|
var lc = struct_has(_path, "getLineCount")? _path.getLineCount() : 1;
|
||||||
|
|
||||||
if(ind < lc) return _path.getSegmentLength(ind).clone();
|
if(ind < lc) return _path.getSegmentLength(ind);
|
||||||
ind -= lc;
|
ind -= lc;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -97,7 +97,7 @@ function Node_Path_Array(_x, _y, _group = noone) : Node(_x, _y, _group) construc
|
||||||
var _path = inputs[| i].getValue();
|
var _path = inputs[| i].getValue();
|
||||||
var lc = struct_has(_path, "getLineCount")? _path.getLineCount() : 1;
|
var lc = struct_has(_path, "getLineCount")? _path.getLineCount() : 1;
|
||||||
|
|
||||||
if(ind < lc) return _path.getAccuLength(ind).clone();
|
if(ind < lc) return _path.getAccuLength(ind);
|
||||||
ind -= lc;
|
ind -= lc;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -109,7 +109,7 @@ function Node_Path_Array(_x, _y, _group = noone) : Node(_x, _y, _group) construc
|
||||||
var _path = inputs[| i].getValue();
|
var _path = inputs[| i].getValue();
|
||||||
var lc = struct_has(_path, "getLineCount")? _path.getLineCount() : 1;
|
var lc = struct_has(_path, "getLineCount")? _path.getLineCount() : 1;
|
||||||
|
|
||||||
if(ind < lc) return _path.getSegmentCount(ind).clone();
|
if(ind < lc) return _path.getSegmentCount(ind);
|
||||||
ind -= lc;
|
ind -= lc;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,3 +0,0 @@
|
||||||
function node_perlin612(){
|
|
||||||
|
|
||||||
}
|
|
|
@ -239,17 +239,17 @@ function NodeObject(_name, _spr, _node, _create, tags = []) constructor {
|
||||||
addNodeObject(transform, "Flip", s_node_flip, "Node_Flip", [1, Node_Flip], ["mirror"], "Flip image horizontally or vertically.");
|
addNodeObject(transform, "Flip", s_node_flip, "Node_Flip", [1, Node_Flip], ["mirror"], "Flip image horizontally or vertically.");
|
||||||
|
|
||||||
ds_list_add(transform, "Warps");
|
ds_list_add(transform, "Warps");
|
||||||
addNodeObject(transform, "Crop", s_node_crop, "Node_Crop", [1, Node_Crop],, "Crop out image to create smaller ones.");
|
addNodeObject(transform, "Crop", s_node_crop, "Node_Crop", [1, Node_Crop],, "Crop out image to create smaller ones.");
|
||||||
addNodeObject(transform, "Crop Content", s_node_crop_content, "Node_Crop_Content", [1, Node_Crop_Content],, "Crop out empty pixel pixel from the image.");
|
addNodeObject(transform, "Crop Content", s_node_crop_content, "Node_Crop_Content", [1, Node_Crop_Content],, "Crop out empty pixel pixel from the image.");
|
||||||
addNodeObject(transform, "Warp", s_node_warp, "Node_Warp", [1, Node_Warp], ["wrap"], "Warp image by freely moving the corners.");
|
addNodeObject(transform, "Warp", s_node_warp, "Node_Warp", [1, Node_Warp], ["wrap"], "Warp image by freely moving the corners.");
|
||||||
addNodeObject(transform, "Skew", s_node_skew, "Node_Skew", [1, Node_Skew],, "Skew image horizontally, or vertically.");
|
addNodeObject(transform, "Skew", s_node_skew, "Node_Skew", [1, Node_Skew],, "Skew image horizontally, or vertically.");
|
||||||
addNodeObject(transform, "Mesh Warp", s_node_warp_mesh, "Node_Mesh_Warp", [1, Node_Mesh_Warp], ["mesh wrap"], "Wrap image by converting it to mesh, and using control points.");
|
addNodeObject(transform, "Mesh Warp", s_node_warp_mesh, "Node_Mesh_Warp", [1, Node_Mesh_Warp], ["mesh wrap"], "Wrap image by converting it to mesh, and using control points.");
|
||||||
addNodeObject(transform, "Polar", s_node_polar, "Node_Polar", [1, Node_Polar],, "Convert image to polar coordinate.");
|
addNodeObject(transform, "Polar", s_node_polar, "Node_Polar", [1, Node_Polar],, "Convert image to polar coordinate.");
|
||||||
addNodeObject(transform, "Area Warp", s_node_padding, "Node_Wrap_Area", [1, Node_Wrap_Area],, "Wrap image to fit area value (x, y, w, h).");
|
addNodeObject(transform, "Area Warp", s_node_padding, "Node_Wrap_Area", [1, Node_Wrap_Area],, "Wrap image to fit area value (x, y, w, h).");
|
||||||
|
|
||||||
ds_list_add(transform, "Others");
|
ds_list_add(transform, "Others");
|
||||||
addNodeObject(transform, "Composite", s_node_compose, "Node_Composite", [1, Node_Composite], ["merge"], "Combine multiple images with controllable position, rotation, scale.");
|
addNodeObject(transform, "Composite", s_node_compose, "Node_Composite", [1, Node_Composite], ["merge"], "Combine multiple images with controllable position, rotation, scale.");
|
||||||
addNodeObject(transform, "Nine Slice", s_node_9patch, "Node_9Slice", [1, Node_9Slice], ["9", "splice"], "Cut image into 3x3 parts, and scale/repeat only the middle part.");
|
addNodeObject(transform, "Nine Slice", s_node_9patch, "Node_9Slice", [1, Node_9Slice], ["9 slice", "splice"], "Cut image into 3x3 parts, and scale/repeat only the middle part.");
|
||||||
addNodeObject(transform, "Padding", s_node_padding, "Node_Padding", [1, Node_Padding],, "Make image bigger by adding space in 4 directions.");
|
addNodeObject(transform, "Padding", s_node_padding, "Node_Padding", [1, Node_Padding],, "Make image bigger by adding space in 4 directions.");
|
||||||
|
|
||||||
var filter = ds_list_create();
|
var filter = ds_list_create();
|
||||||
|
@ -294,6 +294,7 @@ function NodeObject(_name, _spr, _node, _create, tags = []) constructor {
|
||||||
addNodeObject(filter, "Convolution", s_node_convolution, "Node_Convolution", [1, Node_Convolution], ["kernel"], "Apply convolution operation on each pixel using a custom 3x3 kernel.").setVersion(1090);
|
addNodeObject(filter, "Convolution", s_node_convolution, "Node_Convolution", [1, Node_Convolution], ["kernel"], "Apply convolution operation on each pixel using a custom 3x3 kernel.").setVersion(1090);
|
||||||
addNodeObject(filter, "Local Analyze", s_node_local_analyze, "Node_Local_Analyze", [1, Node_Local_Analyze],, "Apply non-linear operation (minimum, maximum) on each pixel locally.").setVersion(1110);
|
addNodeObject(filter, "Local Analyze", s_node_local_analyze, "Node_Local_Analyze", [1, Node_Local_Analyze],, "Apply non-linear operation (minimum, maximum) on each pixel locally.").setVersion(1110);
|
||||||
addNodeObject(filter, "SDF", s_node_sdf, "Node_SDF", [1, Node_SDF],, "Create signed distance field using jump flooding algorithm.").setVersion(1130);
|
addNodeObject(filter, "SDF", s_node_sdf, "Node_SDF", [1, Node_SDF],, "Create signed distance field using jump flooding algorithm.").setVersion(1130);
|
||||||
|
addNodeObject(filter, "Replace Image", s_node_sdf, "Node_Surface_Replace", [1, Node_Surface_Replace]).setVersion(1140);
|
||||||
addNodeObject(filter, "Chromatic Aberration", s_node_chromatic_abarration, "Node_Chromatic_Aberration", [1, Node_Chromatic_Aberration],, "Apply chromatic aberration effect to the image.");
|
addNodeObject(filter, "Chromatic Aberration", s_node_chromatic_abarration, "Node_Chromatic_Aberration", [1, Node_Chromatic_Aberration],, "Apply chromatic aberration effect to the image.");
|
||||||
|
|
||||||
ds_list_add(filter, "Colors");
|
ds_list_add(filter, "Colors");
|
||||||
|
@ -418,6 +419,7 @@ function NodeObject(_name, _spr, _node, _create, tags = []) constructor {
|
||||||
addNodeObject(values, "Equation", s_node_equation, "Node_Equation", [0, Node_create_Equation],, "Evaluate string of equation. With an option for setting variables.");
|
addNodeObject(values, "Equation", s_node_equation, "Node_Equation", [0, Node_create_Equation],, "Evaluate string of equation. With an option for setting variables.");
|
||||||
addNodeObject(values, "Random", s_node_random, "Node_Random", [1, Node_Random]);
|
addNodeObject(values, "Random", s_node_random, "Node_Random", [1, Node_Random]);
|
||||||
addNodeObject(values, "Statistic", s_node_statistic, "Node_Statistic", [0, Node_create_Statistic], ["sum", "average", "mean", "median", "min", "max"]);
|
addNodeObject(values, "Statistic", s_node_statistic, "Node_Statistic", [0, Node_create_Statistic], ["sum", "average", "mean", "median", "min", "max"]);
|
||||||
|
addNodeObject(values, "Convert Base", s_node_base_conversion, "Node_Base_Convert", [1, Node_Base_Convert], ["base convert", "binary", "hexadecimal"]).setVersion(1140);
|
||||||
addNodeObject(values, "Vector2", s_node_vec2, "Node_Vector2", [1, Node_Vector2]);
|
addNodeObject(values, "Vector2", s_node_vec2, "Node_Vector2", [1, Node_Vector2]);
|
||||||
addNodeObject(values, "Vector3", s_node_vec3, "Node_Vector3", [1, Node_Vector3]);
|
addNodeObject(values, "Vector3", s_node_vec3, "Node_Vector3", [1, Node_Vector3]);
|
||||||
addNodeObject(values, "Vector4", s_node_vec4, "Node_Vector4", [1, Node_Vector4]);
|
addNodeObject(values, "Vector4", s_node_vec4, "Node_Vector4", [1, Node_Vector4]);
|
||||||
|
@ -457,6 +459,7 @@ function NodeObject(_name, _spr, _node, _create, tags = []) constructor {
|
||||||
|
|
||||||
ds_list_add(values, "Paths");
|
ds_list_add(values, "Paths");
|
||||||
addNodeObject(values, "Path", s_node_path, "Node_Path", [1, Node_Path]);
|
addNodeObject(values, "Path", s_node_path, "Node_Path", [1, Node_Path]);
|
||||||
|
addNodeObject(values, "Path Anchor", s_node_path_anchor, "Node_Path_Anchor", [1, Node_Path_Anchor]).setVersion(1140);
|
||||||
addNodeObject(values, "Path Array", s_node_path_array, "Node_Path_Array", [1, Node_Path_Array]).setVersion(1137);
|
addNodeObject(values, "Path Array", s_node_path_array, "Node_Path_Array", [1, Node_Path_Array]).setVersion(1137);
|
||||||
addNodeObject(values, "Sample Path", s_node_path_sample, "Node_Path_Sample", [1, Node_Path_Sample],, "Sample a 2D position from a path");
|
addNodeObject(values, "Sample Path", s_node_path_sample, "Node_Path_Sample", [1, Node_Path_Sample],, "Sample a 2D position from a path");
|
||||||
addNodeObject(values, "Blend Path", s_node_path_blend, "Node_Path_Blend", [1, Node_Path_Blend],, "Blend between 2 paths.");
|
addNodeObject(values, "Blend Path", s_node_path_blend, "Node_Path_Blend", [1, Node_Path_Blend],, "Blend between 2 paths.");
|
||||||
|
@ -614,7 +617,7 @@ function NodeObject(_name, _spr, _node, _create, tags = []) constructor {
|
||||||
#region attribute
|
#region attribute
|
||||||
global.SURFACE_INTERPOLATION = [
|
global.SURFACE_INTERPOLATION = [
|
||||||
"No aliasing",
|
"No aliasing",
|
||||||
"Linear",
|
"Bilinear",
|
||||||
"Bicubic",
|
"Bicubic",
|
||||||
"radSin"
|
"radSin"
|
||||||
];
|
];
|
||||||
|
|
|
@ -1,19 +1,19 @@
|
||||||
function Node_String_Get_Char(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor {
|
function Node_String_Get_Char(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor {
|
||||||
name = "Get Character";
|
name = "Get Character";
|
||||||
previewable = false;
|
previewable = false;
|
||||||
|
|
||||||
w = 96;
|
w = 96;
|
||||||
|
|
||||||
|
|
||||||
inputs[| 0] = nodeValue("Text", self, JUNCTION_CONNECT.input, VALUE_TYPE.text, "")
|
inputs[| 0] = nodeValue("Text", self, JUNCTION_CONNECT.input, VALUE_TYPE.text, "")
|
||||||
.setVisible(true, true);
|
.setVisible(true, true);
|
||||||
|
|
||||||
inputs[| 1] = nodeValue("Index", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0);
|
inputs[| 1] = nodeValue("Index", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 1);
|
||||||
|
|
||||||
|
inputs[| 2] = nodeValue("Amount", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 1);
|
||||||
|
|
||||||
outputs[| 0] = nodeValue("Text", self, JUNCTION_CONNECT.output, VALUE_TYPE.text, "");
|
outputs[| 0] = nodeValue("Text", self, JUNCTION_CONNECT.output, VALUE_TYPE.text, "");
|
||||||
|
|
||||||
function process_data(_output, _data, _index = 0) {
|
function process_data(_output, _data, _index = 0) {
|
||||||
return string_char_at(_data[0], _data[1]);
|
return string_copy(_data[0], _data[1], _data[2]);
|
||||||
}
|
}
|
||||||
|
|
||||||
static onDrawNode = function(xx, yy, _mx, _my, _s, _hover, _focus) {
|
static onDrawNode = function(xx, yy, _mx, _my, _s, _hover, _focus) {
|
||||||
|
|
12
scripts/node_surface_replace/node_gradient.yy
Normal file
12
scripts/node_surface_replace/node_gradient.yy
Normal file
|
@ -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",
|
||||||
|
}
|
66
scripts/node_surface_replace/node_surface_replace.gml
Normal file
66
scripts/node_surface_replace/node_surface_replace.gml
Normal file
|
@ -0,0 +1,66 @@
|
||||||
|
function Node_Surface_Replace(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor {
|
||||||
|
name = "Replace Image";
|
||||||
|
preview_channel = 1;
|
||||||
|
|
||||||
|
inputs[| 0] = nodeValue("Base image", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone );
|
||||||
|
|
||||||
|
inputs[| 1] = nodeValue("Target image", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone );
|
||||||
|
|
||||||
|
inputs[| 2] = nodeValue("Replacement image", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone );
|
||||||
|
|
||||||
|
inputs[| 3] = nodeValue("Threshold", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0.1 )
|
||||||
|
.setDisplay(VALUE_DISPLAY.slider, [ 0, 1, 0.01 ]);
|
||||||
|
|
||||||
|
outputs[| 0] = nodeValue("Mapping", self, JUNCTION_CONNECT.output, VALUE_TYPE.surface, noone);
|
||||||
|
|
||||||
|
outputs[| 1] = nodeValue("Surface out", self, JUNCTION_CONNECT.output, VALUE_TYPE.surface, noone);
|
||||||
|
|
||||||
|
input_display_list = [
|
||||||
|
["Surface", false], 0, 1, 2,
|
||||||
|
["Repalcement", false], 3,
|
||||||
|
];
|
||||||
|
|
||||||
|
output_display_list = [ 1, 0 ]
|
||||||
|
|
||||||
|
temp_surface = [ surface_create(1, 1) ];
|
||||||
|
|
||||||
|
static process_data = function(_outSurf, _data, _output_index, _array_index) {
|
||||||
|
var _bas = _data[0];
|
||||||
|
var _tar = _data[1];
|
||||||
|
var _rep = _data[2];
|
||||||
|
var _thr = _data[3];
|
||||||
|
|
||||||
|
if(!is_surface(_tar)) return _outSurf;
|
||||||
|
if(!is_surface(_rep)) return _outSurf;
|
||||||
|
|
||||||
|
if(_output_index == 0) {
|
||||||
|
_outSurf = surface_verify(_outSurf, surface_get_width(_bas), surface_get_height(_bas));
|
||||||
|
|
||||||
|
surface_set_shader(_outSurf, sh_surface_replace_find);
|
||||||
|
DRAW_CLEAR
|
||||||
|
shader_set_f("dimension", surface_get_width(_bas), surface_get_height(_bas));
|
||||||
|
shader_set_surface("target", _tar);
|
||||||
|
shader_set_f("target_dim", surface_get_width(_tar), surface_get_height(_tar));
|
||||||
|
shader_set_f("threshold", _thr);
|
||||||
|
|
||||||
|
draw_surface_safe(_bas);
|
||||||
|
surface_reset_shader();
|
||||||
|
|
||||||
|
temp_surface[0] = _outSurf;
|
||||||
|
return _outSurf;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(_output_index == 1) {
|
||||||
|
surface_set_shader(_outSurf, sh_surface_replace_replace);
|
||||||
|
DRAW_CLEAR
|
||||||
|
shader_set_surface("replace", _rep);
|
||||||
|
shader_set_f("replace_dim", surface_get_width(_rep), surface_get_height(_rep));
|
||||||
|
shader_set_surface("findRes", temp_surface[0]);
|
||||||
|
|
||||||
|
draw_surface_safe(_bas);
|
||||||
|
surface_reset_shader();
|
||||||
|
|
||||||
|
return _outSurf;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
11
scripts/node_surface_replace/node_surface_replace.yy
Normal file
11
scripts/node_surface_replace/node_surface_replace.yy
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
{
|
||||||
|
"resourceType": "GMScript",
|
||||||
|
"resourceVersion": "1.0",
|
||||||
|
"name": "node_surface_replace",
|
||||||
|
"isCompatibility": false,
|
||||||
|
"isDnD": false,
|
||||||
|
"parent": {
|
||||||
|
"name": "generator",
|
||||||
|
"path": "folders/nodes/data/generator.yy",
|
||||||
|
},
|
||||||
|
}
|
|
@ -396,6 +396,7 @@ function NodeValue(_name, _node, _connect, _type, _value, _tooltip = "") constru
|
||||||
global_edit = new textBox(TEXTBOX_INPUT.text, function(str) {
|
global_edit = new textBox(TEXTBOX_INPUT.text, function(str) {
|
||||||
global_key = str;
|
global_key = str;
|
||||||
node.triggerRender();
|
node.triggerRender();
|
||||||
|
UPDATE = RENDER_TYPE.partial;
|
||||||
});
|
});
|
||||||
global_edit.boxColor = COLORS._main_value_positive;
|
global_edit.boxColor = COLORS._main_value_positive;
|
||||||
global_edit.align = fa_left;
|
global_edit.align = fa_left;
|
||||||
|
@ -1159,9 +1160,10 @@ function NodeValue(_name, _node, _connect, _type, _value, _tooltip = "") constru
|
||||||
if(updated) {
|
if(updated) {
|
||||||
if(connect_type == JUNCTION_CONNECT.input) {
|
if(connect_type == JUNCTION_CONNECT.input) {
|
||||||
node.triggerRender();
|
node.triggerRender();
|
||||||
if(_update)
|
if(_update) node.valueUpdate(index);
|
||||||
node.valueUpdate(index);
|
|
||||||
node.clearCacheForward();
|
node.clearCacheForward();
|
||||||
|
|
||||||
|
UPDATE = RENDER_TYPE.partial;
|
||||||
}
|
}
|
||||||
|
|
||||||
cache_array[0] = false;
|
cache_array[0] = false;
|
||||||
|
@ -1254,6 +1256,8 @@ function NodeValue(_name, _node, _connect, _type, _value, _tooltip = "") constru
|
||||||
node.onValueFromUpdate(index);
|
node.onValueFromUpdate(index);
|
||||||
node.triggerRender();
|
node.triggerRender();
|
||||||
node.clearCacheForward();
|
node.clearCacheForward();
|
||||||
|
|
||||||
|
UPDATE = RENDER_TYPE.partial;
|
||||||
}
|
}
|
||||||
|
|
||||||
cache_array[0] = false;
|
cache_array[0] = false;
|
||||||
|
|
|
@ -179,50 +179,75 @@ function Node_Warp(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) cons
|
||||||
var bl = _data[3];
|
var bl = _data[3];
|
||||||
var br = _data[4];
|
var br = _data[4];
|
||||||
|
|
||||||
surface_set_shader(_outSurf);
|
var sw = surface_get_width(_data[0]);
|
||||||
shader_set_interpolation(_data[0]);
|
var sh = surface_get_height(_data[0]);
|
||||||
draw_set_color(c_white);
|
|
||||||
|
|
||||||
var tex = surface_get_texture(_data[0]);
|
var teq = round(tl[1]) == round(tr[1]);
|
||||||
draw_primitive_begin_texture(pr_trianglestrip, tex);
|
var beq = round(bl[1]) == round(br[1]);
|
||||||
|
var leq = round(tl[0]) == round(bl[0]);
|
||||||
|
var req = round(tr[0]) == round(br[0]);
|
||||||
|
|
||||||
var res = 4;
|
if(teq && beq && leq && req) {
|
||||||
var _i0, _i1, _j0, _j1;
|
surface_set_shader(_outSurf)
|
||||||
var tl_x = tl[0];
|
shader_set_interpolation(_data[0]);
|
||||||
var tl_y = tl[1];
|
draw_surface_stretched_safe(_data[0], tl[0], tl[1], tr[0] - tl[0], bl[1] - tl[1]);
|
||||||
var tr_x = tr[0];
|
surface_reset_shader();
|
||||||
var tr_y = tr[1];
|
} else {
|
||||||
var bl_x = bl[0];
|
surface_set_shader(_outSurf, sh_warp_4points);
|
||||||
var bl_y = bl[1];
|
shader_set_interpolation(_data[0]);
|
||||||
var br_x = br[0];
|
shader_set_f("p0", br[0] / sw, br[1] / sh);
|
||||||
var br_y = br[1];
|
shader_set_f("p1", tr[0] / sw, tr[1] / sh);
|
||||||
|
shader_set_f("p2", tl[0] / sw, tl[1] / sh);
|
||||||
|
shader_set_f("p3", bl[0] / sw, bl[1] / sh);
|
||||||
|
|
||||||
for( var i = 0; i < res; i++ ) {
|
draw_surface(_data[0], 0, 0);
|
||||||
for( var j = 0; j < res; j++ ) {
|
surface_reset_shader();
|
||||||
_i0 = i / res;
|
}
|
||||||
_i1 = (i + 1) / res;
|
|
||||||
_j0 = j / res;
|
|
||||||
_j1 = (j + 1) / res;
|
|
||||||
|
|
||||||
var _tlx = lerp(lerp(tl_x, tr_x, _i0), lerp(bl_x, br_x, _i0), _j0);
|
//surface_set_shader(_outSurf);
|
||||||
var _tly = lerp(lerp(tl_y, tr_y, _i0), lerp(bl_y, br_y, _i0), _j0);
|
//shader_set_interpolation(_data[0]);
|
||||||
var _trx = lerp(lerp(tl_x, tr_x, _i1), lerp(bl_x, br_x, _i1), _j0);
|
// draw_set_color(c_white);
|
||||||
var _try = lerp(lerp(tl_y, tr_y, _i1), lerp(bl_y, br_y, _i1), _j0);
|
|
||||||
|
|
||||||
var _blx = lerp(lerp(tl_x, tr_x, _i0), lerp(bl_x, br_x, _i0), _j1);
|
// var tex = surface_get_texture(_data[0]);
|
||||||
var _bly = lerp(lerp(tl_y, tr_y, _i0), lerp(bl_y, br_y, _i0), _j1);
|
// draw_primitive_begin_texture(pr_trianglestrip, tex);
|
||||||
var _brx = lerp(lerp(tl_x, tr_x, _i1), lerp(bl_x, br_x, _i1), _j1);
|
|
||||||
var _bry = lerp(lerp(tl_y, tr_y, _i1), lerp(bl_y, br_y, _i1), _j1);
|
|
||||||
|
|
||||||
draw_vertex_texture(_tlx, _tly, _i0, _j0);
|
// var res = 4;
|
||||||
draw_vertex_texture(_trx, _try, _i1, _j0);
|
// var _i0, _i1, _j0, _j1;
|
||||||
|
// var tl_x = tl[0];
|
||||||
|
// var tl_y = tl[1];
|
||||||
|
// var tr_x = tr[0];
|
||||||
|
// var tr_y = tr[1];
|
||||||
|
// var bl_x = bl[0];
|
||||||
|
// var bl_y = bl[1];
|
||||||
|
// var br_x = br[0];
|
||||||
|
// var br_y = br[1];
|
||||||
|
|
||||||
draw_vertex_texture(_blx, _bly, _i0, _j1);
|
// for( var i = 0; i < res; i++ ) {
|
||||||
draw_vertex_texture(_brx, _bry, _i1, _j1);
|
// for( var j = 0; j < res; j++ ) {
|
||||||
}
|
// _i0 = i / res;
|
||||||
}
|
// _i1 = (i + 1) / res;
|
||||||
draw_primitive_end();
|
// _j0 = j / res;
|
||||||
surface_reset_shader();
|
// _j1 = (j + 1) / res;
|
||||||
|
|
||||||
|
// var _tlx = lerp(lerp(tl_x, tr_x, _i0), lerp(bl_x, br_x, _i0), _j0);
|
||||||
|
// var _tly = lerp(lerp(tl_y, tr_y, _i0), lerp(bl_y, br_y, _i0), _j0);
|
||||||
|
// var _trx = lerp(lerp(tl_x, tr_x, _i1), lerp(bl_x, br_x, _i1), _j0);
|
||||||
|
// var _try = lerp(lerp(tl_y, tr_y, _i1), lerp(bl_y, br_y, _i1), _j0);
|
||||||
|
|
||||||
|
// var _blx = lerp(lerp(tl_x, tr_x, _i0), lerp(bl_x, br_x, _i0), _j1);
|
||||||
|
// var _bly = lerp(lerp(tl_y, tr_y, _i0), lerp(bl_y, br_y, _i0), _j1);
|
||||||
|
// var _brx = lerp(lerp(tl_x, tr_x, _i1), lerp(bl_x, br_x, _i1), _j1);
|
||||||
|
// var _bry = lerp(lerp(tl_y, tr_y, _i1), lerp(bl_y, br_y, _i1), _j1);
|
||||||
|
|
||||||
|
// draw_vertex_texture(_tlx, _tly, _i0, _j0);
|
||||||
|
// draw_vertex_texture(_trx, _try, _i1, _j0);
|
||||||
|
|
||||||
|
// draw_vertex_texture(_blx, _bly, _i0, _j1);
|
||||||
|
// draw_vertex_texture(_brx, _bry, _i1, _j1);
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// draw_primitive_end();
|
||||||
|
//surface_reset_shader();
|
||||||
|
|
||||||
return _outSurf;
|
return _outSurf;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,3 +0,0 @@
|
||||||
function node_wrap608(){
|
|
||||||
|
|
||||||
}
|
|
12
scripts/node_wrap_perspective/node_outline.yy
Normal file
12
scripts/node_wrap_perspective/node_outline.yy
Normal file
|
@ -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",
|
||||||
|
}
|
226
scripts/node_wrap_perspective/node_wrap_perspective.gml
Normal file
226
scripts/node_wrap_perspective/node_wrap_perspective.gml
Normal file
|
@ -0,0 +1,226 @@
|
||||||
|
function Node_Warp_Perspective(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor {
|
||||||
|
name = "Perspective Warp";
|
||||||
|
|
||||||
|
inputs[| 0] = nodeValue("Surface in", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, 0);
|
||||||
|
|
||||||
|
inputs[| 1] = nodeValue("Active", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, true);
|
||||||
|
active_index = 1;
|
||||||
|
|
||||||
|
inputs[| 2] = nodeValue("Top left", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 0, 0 ] )
|
||||||
|
.setDisplay(VALUE_DISPLAY.vector)
|
||||||
|
.setUnitRef(function(index) { return getDimension(index); });
|
||||||
|
|
||||||
|
inputs[| 3] = nodeValue("Top right", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ def_surf_size, 0 ] )
|
||||||
|
.setDisplay(VALUE_DISPLAY.vector)
|
||||||
|
.setUnitRef(function(index) { return getDimension(index); });
|
||||||
|
|
||||||
|
inputs[| 4] = nodeValue("Bottom left", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 0, def_surf_size ] )
|
||||||
|
.setDisplay(VALUE_DISPLAY.vector)
|
||||||
|
.setUnitRef(function(index) { return getDimension(index); });
|
||||||
|
|
||||||
|
inputs[| 5] = nodeValue("Bottom right", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ def_surf_size, def_surf_size ] )
|
||||||
|
.setDisplay(VALUE_DISPLAY.vector)
|
||||||
|
.setUnitRef(function(index) { return getDimension(index); });
|
||||||
|
|
||||||
|
inputs[| 6] = nodeValue("Top left", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 0, 0 ] )
|
||||||
|
.setDisplay(VALUE_DISPLAY.vector)
|
||||||
|
.setUnitRef(function(index) { return getDimension(index); });
|
||||||
|
|
||||||
|
inputs[| 7] = nodeValue("Top right", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ def_surf_size, 0 ] )
|
||||||
|
.setDisplay(VALUE_DISPLAY.vector)
|
||||||
|
.setUnitRef(function(index) { return getDimension(index); });
|
||||||
|
|
||||||
|
inputs[| 8] = nodeValue("Bottom left", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 0, def_surf_size ] )
|
||||||
|
.setDisplay(VALUE_DISPLAY.vector)
|
||||||
|
.setUnitRef(function(index) { return getDimension(index); });
|
||||||
|
|
||||||
|
inputs[| 9] = nodeValue("Bottom right", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ def_surf_size, def_surf_size ] )
|
||||||
|
.setDisplay(VALUE_DISPLAY.vector)
|
||||||
|
.setUnitRef(function(index) { return getDimension(index); });
|
||||||
|
|
||||||
|
outputs[| 0] = nodeValue("Surface out", self, JUNCTION_CONNECT.output, VALUE_TYPE.surface, noone);
|
||||||
|
|
||||||
|
input_display_list = [ 1,
|
||||||
|
["Surface", false], 0,
|
||||||
|
["Origin", false], 2, 3, 4, 5,
|
||||||
|
["Warp", false], 6, 7, 8, 9,
|
||||||
|
]
|
||||||
|
|
||||||
|
attribute_surface_depth();
|
||||||
|
attribute_interpolation();
|
||||||
|
|
||||||
|
drag_side = -1;
|
||||||
|
drag_mx = 0;
|
||||||
|
drag_my = 0;
|
||||||
|
drag_s = [[0, 0], [0, 0]];
|
||||||
|
|
||||||
|
static drawOverlay = function(active, _x, _y, _s, _mx, _my, _snx, _sny) {
|
||||||
|
if(array_length(current_data) < ds_list_size(inputs)) return;
|
||||||
|
|
||||||
|
var _surf = outputs[| 0].getValue();
|
||||||
|
if(is_array(_surf)) {
|
||||||
|
if(array_length(_surf) == 0) return;
|
||||||
|
_surf = _surf[preview_index];
|
||||||
|
}
|
||||||
|
|
||||||
|
if(drag_side > -1) {
|
||||||
|
dx = (_mx - drag_mx) / _s;
|
||||||
|
dy = (_my - drag_my) / _s;
|
||||||
|
|
||||||
|
if(mouse_release(mb_left)) {
|
||||||
|
drag_side = -1;
|
||||||
|
UNDO_HOLDING = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
var tool = 1;
|
||||||
|
|
||||||
|
var tl = current_data[tool * 4 + 2];
|
||||||
|
var tr = current_data[tool * 4 + 3];
|
||||||
|
var bl = current_data[tool * 4 + 4];
|
||||||
|
var br = current_data[tool * 4 + 5];
|
||||||
|
|
||||||
|
tl[0] = _x + tl[0] * _s;
|
||||||
|
tr[0] = _x + tr[0] * _s;
|
||||||
|
bl[0] = _x + bl[0] * _s;
|
||||||
|
br[0] = _x + br[0] * _s;
|
||||||
|
|
||||||
|
tl[1] = _y + tl[1] * _s;
|
||||||
|
tr[1] = _y + tr[1] * _s;
|
||||||
|
bl[1] = _y + bl[1] * _s;
|
||||||
|
br[1] = _y + br[1] * _s;
|
||||||
|
|
||||||
|
draw_set_color(COLORS._main_accent);
|
||||||
|
draw_line(tl[0], tl[1], tr[0], tr[1]);
|
||||||
|
draw_line(tl[0], tl[1], bl[0], bl[1]);
|
||||||
|
draw_line(br[0], br[1], tr[0], tr[1]);
|
||||||
|
draw_line(br[0], br[1], bl[0], bl[1]);
|
||||||
|
|
||||||
|
if(inputs[| tool * 4 + 2].drawOverlay(active, _x, _y, _s, _mx, _my, _snx, _sny)) active = false;
|
||||||
|
if(inputs[| tool * 4 + 3].drawOverlay(active, _x, _y, _s, _mx, _my, _snx, _sny)) active = false;
|
||||||
|
if(inputs[| tool * 4 + 4].drawOverlay(active, _x, _y, _s, _mx, _my, _snx, _sny)) active = false;
|
||||||
|
if(inputs[| tool * 4 + 5].drawOverlay(active, _x, _y, _s, _mx, _my, _snx, _sny)) active = false;
|
||||||
|
|
||||||
|
var dx = 0;
|
||||||
|
var dy = 0;
|
||||||
|
|
||||||
|
draw_set_color(COLORS.node_overlay_gizmo_inactive);
|
||||||
|
if(drag_side == tool * 4 + 2) {
|
||||||
|
draw_line_width(tl[0], tl[1], tr[0], tr[1], 3);
|
||||||
|
|
||||||
|
var _tlx = value_snap(drag_s[0][0] + dx, _snx);
|
||||||
|
var _tly = value_snap(drag_s[0][1] + dy, _sny);
|
||||||
|
|
||||||
|
var _trx = value_snap(drag_s[1][0] + dx, _snx);
|
||||||
|
var _try = value_snap(drag_s[1][1] + dy, _sny);
|
||||||
|
|
||||||
|
inputs[| tool * 4 + 2].setValue([ _tlx, _tly ])
|
||||||
|
if(inputs[| tool * 4 + 3].setValue([ _trx, _try ])) UNDO_HOLDING = true;
|
||||||
|
} else if(drag_side == tool * 4 + 3) {
|
||||||
|
draw_line_width(tl[0], tl[1], bl[0], bl[1], 3);
|
||||||
|
|
||||||
|
var _tlx = value_snap(drag_s[0][0] + dx, _snx);
|
||||||
|
var _tly = value_snap(drag_s[0][1] + dy, _sny);
|
||||||
|
|
||||||
|
var _blx = value_snap(drag_s[1][0] + dx, _snx);
|
||||||
|
var _bly = value_snap(drag_s[1][1] + dy, _sny);
|
||||||
|
|
||||||
|
inputs[| tool * 4 + 2].setValue([ _tlx, _tly ]);
|
||||||
|
if(inputs[| tool * 4 + 4].setValue([ _blx, _bly ])) UNDO_HOLDING = true;
|
||||||
|
} else if(drag_side == tool * 4 + 4) {
|
||||||
|
draw_line_width(br[0], br[1], tr[0], tr[1], 3);
|
||||||
|
|
||||||
|
var _brx = value_snap(drag_s[0][0] + dx, _snx);
|
||||||
|
var _bry = value_snap(drag_s[0][1] + dy, _sny);
|
||||||
|
|
||||||
|
var _trx = value_snap(drag_s[1][0] + dx, _snx);
|
||||||
|
var _try = value_snap(drag_s[1][1] + dy, _sny);
|
||||||
|
|
||||||
|
inputs[| tool * 4 + 5].setValue([ _brx, _bry ]);
|
||||||
|
if(inputs[| tool * 4 + 3].setValue([ _trx, _try ])) UNDO_HOLDING = true;
|
||||||
|
} else if(drag_side == tool * 4 + 5) {
|
||||||
|
draw_line_width(br[0], br[1], bl[0], bl[1], 3);
|
||||||
|
|
||||||
|
var _brx = value_snap(drag_s[0][0] + dx, _snx);
|
||||||
|
var _bry = value_snap(drag_s[0][1] + dy, _sny);
|
||||||
|
|
||||||
|
var _blx = value_snap(drag_s[1][0] + dx, _snx);
|
||||||
|
var _bly = value_snap(drag_s[1][1] + dy, _sny);
|
||||||
|
|
||||||
|
inputs[| tool * 4 + 5].setValue([ _brx, _bry ]);
|
||||||
|
if(inputs[| tool * 4 + 4].setValue([ _blx, _bly ])) UNDO_HOLDING = true;
|
||||||
|
} else if(active) {
|
||||||
|
draw_set_color(COLORS._main_accent);
|
||||||
|
if(distance_to_line_infinite(_mx, _my, tl[0], tl[1], tr[0], tr[1]) < 12) {
|
||||||
|
draw_line_width(tl[0], tl[1], tr[0], tr[1], 3);
|
||||||
|
if(mouse_press(mb_left, active)) {
|
||||||
|
drag_side = tool * 4 + 2;
|
||||||
|
drag_mx = _mx;
|
||||||
|
drag_my = _my;
|
||||||
|
drag_s = [ current_data[tool * 4 + 2], current_data[tool * 4 + 3] ];
|
||||||
|
}
|
||||||
|
} else if(distance_to_line_infinite(_mx, _my, tl[0], tl[1], bl[0], bl[1]) < 12) {
|
||||||
|
draw_line_width(tl[0], tl[1], bl[0], bl[1], 3);
|
||||||
|
if(mouse_press(mb_left, active)) {
|
||||||
|
drag_side = tool * 4 + 3;
|
||||||
|
drag_mx = _mx;
|
||||||
|
drag_my = _my;
|
||||||
|
drag_s = [ current_data[tool * 4 + 2], current_data[tool * 4 + 4] ];
|
||||||
|
}
|
||||||
|
} else if(distance_to_line_infinite(_mx, _my, br[0], br[1], tr[0], tr[1]) < 12) {
|
||||||
|
draw_line_width(br[0], br[1], tr[0], tr[1], 3);
|
||||||
|
if(mouse_press(mb_left, active)) {
|
||||||
|
drag_side = tool * 4 + 4;
|
||||||
|
drag_mx = _mx;
|
||||||
|
drag_my = _my;
|
||||||
|
drag_s = [ current_data[tool * 4 + 5], current_data[tool * 4 + 3] ];
|
||||||
|
}
|
||||||
|
} else if(distance_to_line_infinite(_mx, _my, br[0], br[1], bl[0], bl[1]) < 12) {
|
||||||
|
draw_line_width(br[0], br[1], bl[0], bl[1], 3);
|
||||||
|
if(mouse_press(mb_left, active)) {
|
||||||
|
drag_side = tool * 4 + 5;
|
||||||
|
drag_mx = _mx;
|
||||||
|
drag_my = _my;
|
||||||
|
drag_s = [ current_data[tool * 4 + 5], current_data[tool * 4 + 4] ];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
inputs[| tool * 4 + 2].drawOverlay(active, _x, _y, _s, _mx, _my, _snx, _sny);
|
||||||
|
inputs[| tool * 4 + 3].drawOverlay(active, _x, _y, _s, _mx, _my, _snx, _sny);
|
||||||
|
inputs[| tool * 4 + 4].drawOverlay(active, _x, _y, _s, _mx, _my, _snx, _sny);
|
||||||
|
inputs[| tool * 4 + 5].drawOverlay(active, _x, _y, _s, _mx, _my, _snx, _sny);
|
||||||
|
}
|
||||||
|
|
||||||
|
static process_data = function(_outSurf, _data, _output_index, _array_index) {
|
||||||
|
var Ftl = _data[2];
|
||||||
|
var Ftr = _data[3];
|
||||||
|
var Fbl = _data[4];
|
||||||
|
var Fbr = _data[5];
|
||||||
|
|
||||||
|
var Ttl = _data[6];
|
||||||
|
var Ttr = _data[7];
|
||||||
|
var Tbl = _data[8];
|
||||||
|
var Tbr = _data[9];
|
||||||
|
|
||||||
|
var sw = surface_get_width(_data[0]);
|
||||||
|
var sh = surface_get_height(_data[0]);
|
||||||
|
|
||||||
|
surface_set_shader(_outSurf, sh_warp_4points_pers);
|
||||||
|
shader_set_interpolation(_data[0]);
|
||||||
|
shader_set_f("f1", Fbr[0] / sw, Fbr[1] / sh);
|
||||||
|
shader_set_f("f2", Ftr[0] / sw, Ftr[1] / sh);
|
||||||
|
shader_set_f("f3", Ftl[0] / sw, Ftl[1] / sh);
|
||||||
|
shader_set_f("f4", Fbl[0] / sw, Fbl[1] / sh);
|
||||||
|
|
||||||
|
shader_set_f("t1", Tbr[0] / sw, Tbr[1] / sh);
|
||||||
|
shader_set_f("t2", Ttr[0] / sw, Ttr[1] / sh);
|
||||||
|
shader_set_f("t3", Ttl[0] / sw, Ttl[1] / sh);
|
||||||
|
shader_set_f("t4", Tbl[0] / sw, Tbl[1] / sh);
|
||||||
|
|
||||||
|
draw_surface(_data[0], 0, 0);
|
||||||
|
surface_reset_shader();
|
||||||
|
|
||||||
|
return _outSurf;
|
||||||
|
}
|
||||||
|
}
|
11
scripts/node_wrap_perspective/node_wrap_perspective.yy
Normal file
11
scripts/node_wrap_perspective/node_wrap_perspective.yy
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
{
|
||||||
|
"resourceType": "GMScript",
|
||||||
|
"resourceVersion": "1.0",
|
||||||
|
"name": "node_wrap_perspective",
|
||||||
|
"isCompatibility": false,
|
||||||
|
"isDnD": false,
|
||||||
|
"parent": {
|
||||||
|
"name": "transform",
|
||||||
|
"path": "folders/nodes/data/transform.yy",
|
||||||
|
},
|
||||||
|
}
|
31
scripts/number_function/number_function.gml
Normal file
31
scripts/number_function/number_function.gml
Normal file
|
@ -0,0 +1,31 @@
|
||||||
|
function convertBase(str, fromBase, toBase) {
|
||||||
|
// Convert the input string to decimal first
|
||||||
|
var decimalNum = 0;
|
||||||
|
var len = string_length(str);
|
||||||
|
|
||||||
|
for (var i = 1; i <= len; i++) {
|
||||||
|
var digit = string_char_at(str, len - i + 1);
|
||||||
|
var value = 0;
|
||||||
|
if (digit >= "0" && digit <= "9")
|
||||||
|
value = ord(digit) - ord("0");
|
||||||
|
else if (digit >= "A" && digit <= "Z")
|
||||||
|
value = ord(digit) - ord("A") + 10;
|
||||||
|
else if (digit >= "a" && digit <= "z")
|
||||||
|
value = ord(digit) - ord("a") + 10;
|
||||||
|
|
||||||
|
decimalNum += value * power(fromBase, i - 1);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Convert the decimal number to the new base
|
||||||
|
var newStr = "";
|
||||||
|
while (decimalNum > 0) {
|
||||||
|
var digit = decimalNum % toBase;
|
||||||
|
if (digit < 10)
|
||||||
|
newStr = chr(digit + ord("0")) + newStr;
|
||||||
|
else
|
||||||
|
newStr = chr(digit - 10 + ord("A")) + newStr;
|
||||||
|
decimalNum = floor(decimalNum / toBase);
|
||||||
|
}
|
||||||
|
|
||||||
|
return newStr;
|
||||||
|
}
|
11
scripts/number_function/number_function.yy
Normal file
11
scripts/number_function/number_function.yy
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
{
|
||||||
|
"resourceType": "GMScript",
|
||||||
|
"resourceVersion": "1.0",
|
||||||
|
"name": "number_function",
|
||||||
|
"isCompatibility": false,
|
||||||
|
"isDnD": false,
|
||||||
|
"parent": {
|
||||||
|
"name": "value",
|
||||||
|
"path": "folders/functions/value.yy",
|
||||||
|
},
|
||||||
|
}
|
|
@ -7,6 +7,7 @@ function pathArrayBox(_target, _data, _onClick) : widget() constructor {
|
||||||
var path = get_open_filenames(data[0], data[1]);
|
var path = get_open_filenames(data[0], data[1]);
|
||||||
key_release();
|
key_release();
|
||||||
if(path == "") return noone;
|
if(path == "") return noone;
|
||||||
|
|
||||||
var paths = string_splice(path, "\n");
|
var paths = string_splice(path, "\n");
|
||||||
onClick(paths);
|
onClick(paths);
|
||||||
}, THEME.button_path_icon);
|
}, THEME.button_path_icon);
|
||||||
|
|
|
@ -23,7 +23,7 @@ function __nodeLeafList(_list) {
|
||||||
var _startNode = _node.isRenderable();
|
var _startNode = _node.isRenderable();
|
||||||
if(_startNode) {
|
if(_startNode) {
|
||||||
array_push(nodes, _node);
|
array_push(nodes, _node);
|
||||||
printIf(global.RENDER_LOG, "Push node " + _node.name + " to stack");
|
printIf(global.RENDER_LOG, " > Push node " + _node.name + " to stack");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -83,36 +83,41 @@ function Render(partial = false, runAction = false) {
|
||||||
|
|
||||||
if(!_node.active) continue;
|
if(!_node.active) continue;
|
||||||
if(!_node.renderActive) continue;
|
if(!_node.renderActive) continue;
|
||||||
if(_node.rendered) continue;
|
if(_node.rendered) {
|
||||||
|
printIf(global.RENDER_LOG, " > Skip rendered " + _node.name + " (" + _node.display_name + ")");
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
if(__nodeInLoop(_node)) continue;
|
if(__nodeInLoop(_node)) continue;
|
||||||
|
|
||||||
var _startNode = _node.isRenderable();
|
var _startNode = _node.isRenderable(global.RENDER_LOG);
|
||||||
if(_startNode) {
|
if(_startNode) {
|
||||||
printIf(global.RENDER_LOG, " > Found leaf " + _node.name + " (" + _node.display_name + ")");
|
printIf(global.RENDER_LOG, " > Found leaf " + _node.name + " (" + _node.display_name + ")");
|
||||||
|
|
||||||
_node.triggerRender();
|
_node.triggerRender();
|
||||||
ds_queue_enqueue(RENDER_QUEUE, _node);
|
ds_queue_enqueue(RENDER_QUEUE, _node);
|
||||||
}
|
} else
|
||||||
|
printIf(global.RENDER_LOG, " > Skip leaf " + _node.name + " (" + _node.display_name + ")");
|
||||||
}
|
}
|
||||||
|
|
||||||
// render forward
|
// render forward
|
||||||
while(!ds_queue_empty(RENDER_QUEUE)) {
|
while(!ds_queue_empty(RENDER_QUEUE)) {
|
||||||
rendering = ds_queue_dequeue(RENDER_QUEUE);
|
rendering = ds_queue_dequeue(RENDER_QUEUE);
|
||||||
|
|
||||||
|
var txt = rendering.rendered? " [Skip]" : " [Update]";
|
||||||
|
|
||||||
if(!rendering.rendered) {
|
if(!rendering.rendered) {
|
||||||
rendering.doUpdate();
|
rendering.doUpdate();
|
||||||
printIf(global.RENDER_LOG, "Rendered " + rendering.name + " (" + rendering.display_name + ") [" + string(instanceof(rendering)) + "] (Update)");
|
|
||||||
|
|
||||||
var nextNodes = rendering.getNextNodes();
|
var nextNodes = rendering.getNextNodes();
|
||||||
for( var i = 0; i < array_length(nextNodes); i++ ) {
|
for( var i = 0; i < array_length(nextNodes); i++ )
|
||||||
if(!nextNodes[i].isRenderable()) continue;
|
|
||||||
ds_queue_enqueue(RENDER_QUEUE, nextNodes[i]);
|
ds_queue_enqueue(RENDER_QUEUE, nextNodes[i]);
|
||||||
}
|
|
||||||
|
|
||||||
if(runAction && rendering.hasInspector1Update())
|
if(runAction && rendering.hasInspector1Update())
|
||||||
rendering.inspector1Update();
|
rendering.inspector1Update();
|
||||||
} else
|
}
|
||||||
printIf(global.RENDER_LOG, "Rendered " + rendering.name + " (" + rendering.display_name + ") [" + string(instanceof(rendering)) + "] (Skip)");
|
|
||||||
|
printIf(global.RENDER_LOG, "Rendered " + rendering.name + " (" + rendering.display_name + ") [" + string(instanceof(rendering)) + "]" + txt);
|
||||||
}
|
}
|
||||||
} catch(e)
|
} catch(e)
|
||||||
noti_warning(exception_print(e));
|
noti_warning(exception_print(e));
|
||||||
|
@ -153,7 +158,7 @@ function RenderListAction(list, context = PANEL_GRAPH.getCurrentContext()) {
|
||||||
|
|
||||||
if(_node.isRenderable()) {
|
if(_node.isRenderable()) {
|
||||||
ds_queue_enqueue(RENDER_QUEUE, _node);
|
ds_queue_enqueue(RENDER_QUEUE, _node);
|
||||||
printIf(global.RENDER_LOG, " > Push " + _node.name + " (" + _node.display_name + ") node to stack");
|
printIf(global.RENDER_LOG, " > Push " + _node.name + " (" + _node.display_name + ") node to stack");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -163,6 +168,7 @@ function RenderListAction(list, context = PANEL_GRAPH.getCurrentContext()) {
|
||||||
if(rendering.group == context) break;
|
if(rendering.group == context) break;
|
||||||
|
|
||||||
var txt = rendering.rendered? " [Skip]" : " [Update]";
|
var txt = rendering.rendered? " [Skip]" : " [Update]";
|
||||||
|
|
||||||
if(!rendering.rendered) {
|
if(!rendering.rendered) {
|
||||||
rendering.doUpdate();
|
rendering.doUpdate();
|
||||||
if(rendering.hasInspector1Update()) {
|
if(rendering.hasInspector1Update()) {
|
||||||
|
@ -171,11 +177,10 @@ function RenderListAction(list, context = PANEL_GRAPH.getCurrentContext()) {
|
||||||
}
|
}
|
||||||
|
|
||||||
var nextNodes = rendering.getNextNodes();
|
var nextNodes = rendering.getNextNodes();
|
||||||
for( var i = 0; i < array_length(nextNodes); i++ ) {
|
for( var i = 0; i < array_length(nextNodes); i++ )
|
||||||
if(!nextNodes[i].isRenderable()) continue;
|
|
||||||
ds_queue_enqueue(RENDER_QUEUE, nextNodes[i]);
|
ds_queue_enqueue(RENDER_QUEUE, nextNodes[i]);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
printIf(global.RENDER_LOG, "Rendered " + rendering.name + " (" + rendering.display_name + ") [" + string(instanceof(rendering)) + "]" + txt);
|
printIf(global.RENDER_LOG, "Rendered " + rendering.name + " (" + rendering.display_name + ") [" + string(instanceof(rendering)) + "]" + txt);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
//draw
|
//draw
|
||||||
function draw_surface_safe(surface, _x, _y) {
|
function draw_surface_safe(surface, _x = 0, _y = 0) {
|
||||||
if(!is_surface(surface)) return;
|
if(!is_surface(surface)) return;
|
||||||
|
|
||||||
__channel_pre(surface);
|
__channel_pre(surface);
|
||||||
|
|
|
@ -1,10 +0,0 @@
|
||||||
//
|
|
||||||
// Simple passthrough fragment shader
|
|
||||||
//
|
|
||||||
varying vec2 v_vTexcoord;
|
|
||||||
varying vec4 v_vColour;
|
|
||||||
|
|
||||||
void main()
|
|
||||||
{
|
|
||||||
gl_FragColor = v_vColour * texture2D( gm_BaseTexture, v_vTexcoord );
|
|
||||||
}
|
|
|
@ -1,10 +0,0 @@
|
||||||
//
|
|
||||||
// Simple passthrough fragment shader
|
|
||||||
//
|
|
||||||
varying vec2 v_vTexcoord;
|
|
||||||
varying vec4 v_vColour;
|
|
||||||
|
|
||||||
void main()
|
|
||||||
{
|
|
||||||
gl_FragColor = v_vColour * texture2D( gm_BaseTexture, v_vTexcoord );
|
|
||||||
}
|
|
61
shaders/sh_surface_replace_find/sh_surface_replace_find.fsh
Normal file
61
shaders/sh_surface_replace_find/sh_surface_replace_find.fsh
Normal file
|
@ -0,0 +1,61 @@
|
||||||
|
//
|
||||||
|
// Simple passthrough fragment shader
|
||||||
|
//
|
||||||
|
varying vec2 v_vTexcoord;
|
||||||
|
varying vec4 v_vColour;
|
||||||
|
|
||||||
|
uniform vec2 dimension;
|
||||||
|
uniform sampler2D target;
|
||||||
|
uniform vec2 target_dim;
|
||||||
|
uniform float threshold;
|
||||||
|
|
||||||
|
float random (in vec2 st) {
|
||||||
|
return fract(sin(dot(st.xy, vec2(12.9898, 78.233))) * 43758.5453123);
|
||||||
|
}
|
||||||
|
|
||||||
|
float matchTemplate(vec2 pos) {
|
||||||
|
float match = 0.;
|
||||||
|
vec2 baseTx = 1. / dimension;
|
||||||
|
vec2 targTx = 1. / target_dim;
|
||||||
|
|
||||||
|
for( float i = 0.; i < target_dim.x; i++ )
|
||||||
|
for( float j = 0.; j < target_dim.y; j++ ) {
|
||||||
|
vec2 bpx = pos + vec2(i, j);
|
||||||
|
vec4 base = texture2D( gm_BaseTexture, bpx * baseTx );
|
||||||
|
vec4 targ = texture2D( target, vec2(i, j) * targTx );
|
||||||
|
|
||||||
|
if(distance(base.rgb * base.a, targ.rgb * targ.a) <= threshold)
|
||||||
|
match++;
|
||||||
|
}
|
||||||
|
|
||||||
|
return match;
|
||||||
|
}
|
||||||
|
|
||||||
|
void main() {
|
||||||
|
vec4 base = texture2D( gm_BaseTexture, v_vTexcoord );
|
||||||
|
if(base.a == 0.) {
|
||||||
|
gl_FragColor = vec4(vec3(0.), 0.);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
vec2 px = v_vTexcoord * dimension;
|
||||||
|
|
||||||
|
float target_pixels = target_dim.x * target_dim.y * (1. - threshold);
|
||||||
|
float match = 0.;
|
||||||
|
vec2 matchPos = vec2(0., 0.);
|
||||||
|
|
||||||
|
for( float i = 0.; i < target_dim.x; i++ )
|
||||||
|
for( float j = 0.; j < target_dim.y; j++ ) {
|
||||||
|
vec2 uv = px - vec2(i, j);
|
||||||
|
if(uv.x < 0. || uv.y < 0.) continue;
|
||||||
|
if(uv.x + target_dim.x > dimension.x || uv.y + target_dim.y > dimension.y) continue;
|
||||||
|
|
||||||
|
float matchTemp = matchTemplate(uv);
|
||||||
|
if(matchTemp > match) {
|
||||||
|
match = matchTemp;
|
||||||
|
matchPos = vec2(i, j) / target_dim;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
gl_FragColor = match >= target_pixels? vec4(matchPos, random(matchPos), 1.) : vec4(vec3(0.), 0.);
|
||||||
|
}
|
10
shaders/sh_surface_replace_find/sh_surface_replace_find.yy
Normal file
10
shaders/sh_surface_replace_find/sh_surface_replace_find.yy
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
{
|
||||||
|
"resourceType": "GMShader",
|
||||||
|
"resourceVersion": "1.0",
|
||||||
|
"name": "sh_surface_replace_find",
|
||||||
|
"parent": {
|
||||||
|
"name": "surface replace",
|
||||||
|
"path": "folders/shader/surface replace.yy",
|
||||||
|
},
|
||||||
|
"type": 1,
|
||||||
|
}
|
|
@ -1,10 +0,0 @@
|
||||||
//
|
|
||||||
// Simple passthrough fragment shader
|
|
||||||
//
|
|
||||||
varying vec2 v_vTexcoord;
|
|
||||||
varying vec4 v_vColour;
|
|
||||||
|
|
||||||
void main()
|
|
||||||
{
|
|
||||||
gl_FragColor = v_vColour * texture2D( gm_BaseTexture, v_vTexcoord );
|
|
||||||
}
|
|
|
@ -0,0 +1,17 @@
|
||||||
|
//
|
||||||
|
// Simple passthrough fragment shader
|
||||||
|
//
|
||||||
|
varying vec2 v_vTexcoord;
|
||||||
|
varying vec4 v_vColour;
|
||||||
|
|
||||||
|
uniform sampler2D replace;
|
||||||
|
uniform vec2 replace_dim;
|
||||||
|
uniform sampler2D findRes;
|
||||||
|
|
||||||
|
void main() {
|
||||||
|
vec4 res = texture2D( findRes, v_vTexcoord );
|
||||||
|
if(res.a == 1.)
|
||||||
|
gl_FragColor = texture2D( replace, res.rg );
|
||||||
|
else
|
||||||
|
gl_FragColor = texture2D( gm_BaseTexture, v_vTexcoord );
|
||||||
|
}
|
|
@ -0,0 +1,10 @@
|
||||||
|
{
|
||||||
|
"resourceType": "GMShader",
|
||||||
|
"resourceVersion": "1.0",
|
||||||
|
"name": "sh_surface_replace_replace",
|
||||||
|
"parent": {
|
||||||
|
"name": "surface replace",
|
||||||
|
"path": "folders/shader/surface replace.yy",
|
||||||
|
},
|
||||||
|
"type": 1,
|
||||||
|
}
|
94
shaders/sh_warp_4points/sh_warp_4points.fsh
Normal file
94
shaders/sh_warp_4points/sh_warp_4points.fsh
Normal file
|
@ -0,0 +1,94 @@
|
||||||
|
//
|
||||||
|
// Simple passthrough fragment shader
|
||||||
|
//
|
||||||
|
varying vec2 v_vTexcoord;
|
||||||
|
varying vec4 v_vColour;
|
||||||
|
|
||||||
|
uniform vec2 p0;
|
||||||
|
uniform vec2 p1;
|
||||||
|
uniform vec2 p2;
|
||||||
|
uniform vec2 p3;
|
||||||
|
|
||||||
|
/////////////// SAMPLING ///////////////
|
||||||
|
|
||||||
|
const float PI = 3.14159265358979323846;
|
||||||
|
uniform int interpolation;
|
||||||
|
uniform vec2 sampleDimension;
|
||||||
|
|
||||||
|
const int RSIN_RADIUS = 1;
|
||||||
|
|
||||||
|
float sinc ( float x ) { return x == 0.? 1. : sin(x * PI) / (x * PI); }
|
||||||
|
|
||||||
|
vec4 texture2D_rsin( sampler2D texture, vec2 uv ) {
|
||||||
|
vec2 tx = 1.0 / sampleDimension;
|
||||||
|
vec2 p = uv * sampleDimension - vec2(0.5);
|
||||||
|
|
||||||
|
vec4 sum = vec4(0.0);
|
||||||
|
float weights = 0.;
|
||||||
|
|
||||||
|
for (int x = -RSIN_RADIUS; x <= RSIN_RADIUS; x++)
|
||||||
|
for (int y = -RSIN_RADIUS; y <= RSIN_RADIUS; y++) {
|
||||||
|
float a = length(vec2(float(x), float(y))) / float(RSIN_RADIUS);
|
||||||
|
if(a > 1.) continue;
|
||||||
|
float w = sinc(a * PI * tx.x) * sinc(a * PI * tx.y);
|
||||||
|
vec2 offset = vec2(float(x), float(y)) * tx;
|
||||||
|
vec4 sample = texture2D(texture, (p + offset + vec2(0.5)) / sampleDimension);
|
||||||
|
sum += w * sample;
|
||||||
|
weights += w;
|
||||||
|
}
|
||||||
|
|
||||||
|
return sum / weights;
|
||||||
|
}
|
||||||
|
|
||||||
|
vec4 texture2D_bicubic( sampler2D texture, vec2 uv ) {
|
||||||
|
uv = uv * sampleDimension + 0.5;
|
||||||
|
vec2 iuv = floor( uv );
|
||||||
|
vec2 fuv = fract( uv );
|
||||||
|
uv = iuv + fuv * fuv * (3.0 - 2.0 * fuv);
|
||||||
|
uv = (uv - 0.5) / sampleDimension;
|
||||||
|
return texture2D( texture, uv );
|
||||||
|
}
|
||||||
|
|
||||||
|
vec4 texture2Dintp( sampler2D texture, vec2 uv ) {
|
||||||
|
if(interpolation == 2) return texture2D_bicubic( texture, uv );
|
||||||
|
else if(interpolation == 3) return texture2D_rsin( texture, uv );
|
||||||
|
return texture2D( texture, uv );
|
||||||
|
}
|
||||||
|
|
||||||
|
/////////////// SAMPLING ///////////////
|
||||||
|
|
||||||
|
void main() {
|
||||||
|
float px = v_vTexcoord.x;
|
||||||
|
float py = v_vTexcoord.y;
|
||||||
|
|
||||||
|
vec2 A = (p3 - p0) - (p2 - p1);
|
||||||
|
vec2 B = (p0 - p1);
|
||||||
|
vec2 C = (p2 - p1);
|
||||||
|
vec2 D = p1;
|
||||||
|
|
||||||
|
if(abs(A.x) < 0.001) A.x = 0.001;
|
||||||
|
if(abs(B.x) < 0.001) B.x = 0.001;
|
||||||
|
if(abs(C.x) < 0.001) C.x = 0.001;
|
||||||
|
|
||||||
|
if(abs(A.y) < 0.001) A.y = 0.001;
|
||||||
|
if(abs(B.y) < 0.001) B.y = 0.001;
|
||||||
|
if(abs(C.y) < 0.001) C.y = 0.001;
|
||||||
|
|
||||||
|
float c1 = (B.y * C.x) + (A.y * D.x) - (B.x * C.y) - (A.x * D.y);
|
||||||
|
float c2 = (B.y * D.x) - (B.x * D.y);
|
||||||
|
|
||||||
|
float _A = (A.y * C.x) - (A.x * C.y);
|
||||||
|
|
||||||
|
float _B = (A.x * py) + c1 - (A.y * px);
|
||||||
|
float _C = (B.x * py) + c2 - (B.y * px);
|
||||||
|
|
||||||
|
highp float u = A == 0.? 0. : (-_B - sqrt(_B * _B - 4.0 * _A * _C)) / (_A * 2.0);
|
||||||
|
highp float v = (u * A.x + B.x) == 0.? 0. : (px - (u * C.x) - D.x) / (u * A.x + B.x);
|
||||||
|
|
||||||
|
vec2 uv = vec2(1. - u, v);
|
||||||
|
|
||||||
|
if(uv.x >= 0. && uv.y >= 0. && uv.x <= 1. && uv.y <= 1.)
|
||||||
|
gl_FragColor = texture2Dintp( gm_BaseTexture, uv );
|
||||||
|
else
|
||||||
|
gl_FragColor = vec4(0.);
|
||||||
|
}
|
10
shaders/sh_warp_4points/sh_warp_4points.yy
Normal file
10
shaders/sh_warp_4points/sh_warp_4points.yy
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
{
|
||||||
|
"resourceType": "GMShader",
|
||||||
|
"resourceVersion": "1.0",
|
||||||
|
"name": "sh_warp_4points",
|
||||||
|
"parent": {
|
||||||
|
"name": "warp",
|
||||||
|
"path": "folders/shader/warp.yy",
|
||||||
|
},
|
||||||
|
"type": 1,
|
||||||
|
}
|
|
@ -1,10 +0,0 @@
|
||||||
//
|
|
||||||
// Simple passthrough fragment shader
|
|
||||||
//
|
|
||||||
varying vec2 v_vTexcoord;
|
|
||||||
varying vec4 v_vColour;
|
|
||||||
|
|
||||||
void main()
|
|
||||||
{
|
|
||||||
gl_FragColor = v_vColour * texture2D( gm_BaseTexture, v_vTexcoord );
|
|
||||||
}
|
|
123
shaders/sh_warp_4points_pers/sh_warp_4points_pers.fsh
Normal file
123
shaders/sh_warp_4points_pers/sh_warp_4points_pers.fsh
Normal file
|
@ -0,0 +1,123 @@
|
||||||
|
//
|
||||||
|
// Simple passthrough fragment shader
|
||||||
|
//
|
||||||
|
varying vec2 v_vTexcoord;
|
||||||
|
varying vec4 v_vColour;
|
||||||
|
|
||||||
|
uniform vec2 f1;
|
||||||
|
uniform vec2 f2;
|
||||||
|
uniform vec2 f3;
|
||||||
|
uniform vec2 f4;
|
||||||
|
uniform vec2 t1;
|
||||||
|
uniform vec2 t2;
|
||||||
|
uniform vec2 t3;
|
||||||
|
uniform vec2 t4;
|
||||||
|
|
||||||
|
/////////////// SAMPLING ///////////////
|
||||||
|
|
||||||
|
const float PI = 3.14159265358979323846;
|
||||||
|
uniform int interpolation;
|
||||||
|
uniform vec2 sampleDimension;
|
||||||
|
|
||||||
|
const int RSIN_RADIUS = 1;
|
||||||
|
|
||||||
|
float sinc ( float x ) { return x == 0.? 1. : sin(x * PI) / (x * PI); }
|
||||||
|
|
||||||
|
vec4 texture2D_rsin( sampler2D texture, vec2 uv ) {
|
||||||
|
vec2 tx = 1.0 / sampleDimension;
|
||||||
|
vec2 p = uv * sampleDimension - vec2(0.5);
|
||||||
|
|
||||||
|
vec4 sum = vec4(0.0);
|
||||||
|
float weights = 0.;
|
||||||
|
|
||||||
|
for (int x = -RSIN_RADIUS; x <= RSIN_RADIUS; x++)
|
||||||
|
for (int y = -RSIN_RADIUS; y <= RSIN_RADIUS; y++) {
|
||||||
|
float a = length(vec2(float(x), float(y))) / float(RSIN_RADIUS);
|
||||||
|
if(a > 1.) continue;
|
||||||
|
float w = sinc(a * PI * tx.x) * sinc(a * PI * tx.y);
|
||||||
|
vec2 offset = vec2(float(x), float(y)) * tx;
|
||||||
|
vec4 sample = texture2D(texture, (p + offset + vec2(0.5)) / sampleDimension);
|
||||||
|
sum += w * sample;
|
||||||
|
weights += w;
|
||||||
|
}
|
||||||
|
|
||||||
|
return sum / weights;
|
||||||
|
}
|
||||||
|
|
||||||
|
vec4 texture2D_bicubic( sampler2D texture, vec2 uv ) {
|
||||||
|
uv = uv * sampleDimension + 0.5;
|
||||||
|
vec2 iuv = floor( uv );
|
||||||
|
vec2 fuv = fract( uv );
|
||||||
|
uv = iuv + fuv * fuv * (3.0 - 2.0 * fuv);
|
||||||
|
uv = (uv - 0.5) / sampleDimension;
|
||||||
|
return texture2D( texture, uv );
|
||||||
|
}
|
||||||
|
|
||||||
|
vec4 texture2Dintp( sampler2D texture, vec2 uv ) {
|
||||||
|
if(interpolation == 2) return texture2D_bicubic( texture, uv );
|
||||||
|
else if(interpolation == 3) return texture2D_rsin( texture, uv );
|
||||||
|
return texture2D( texture, uv );
|
||||||
|
}
|
||||||
|
|
||||||
|
/////////////// SAMPLING ///////////////
|
||||||
|
|
||||||
|
mat3 m_inverse(mat3 m) {
|
||||||
|
float a11 = m[0][0], a12 = m[0][1], a13 = m[0][2];
|
||||||
|
float a21 = m[1][0], a22 = m[1][1], a23 = m[1][2];
|
||||||
|
float a31 = m[2][0], a32 = m[2][1], a33 = m[2][2];
|
||||||
|
|
||||||
|
float b11 = a22 * a33 - a23 * a32;
|
||||||
|
float b12 = a13 * a32 - a12 * a33;
|
||||||
|
float b13 = a12 * a23 - a13 * a22;
|
||||||
|
float b21 = a23 * a31 - a21 * a33;
|
||||||
|
float b22 = a11 * a33 - a13 * a31;
|
||||||
|
float b23 = a13 * a21 - a11 * a23;
|
||||||
|
float b31 = a21 * a32 - a22 * a31;
|
||||||
|
float b32 = a12 * a31 - a11 * a32;
|
||||||
|
float b33 = a11 * a22 - a12 * a21;
|
||||||
|
|
||||||
|
float det = a11 * b11 + a12 * b21 + a13 * b31;
|
||||||
|
|
||||||
|
mat3 inverse;
|
||||||
|
inverse[0][0] = b11 / det;
|
||||||
|
inverse[0][1] = b12 / det;
|
||||||
|
inverse[0][2] = b13 / det;
|
||||||
|
inverse[1][0] = b21 / det;
|
||||||
|
inverse[1][1] = b22 / det;
|
||||||
|
inverse[1][2] = b23 / det;
|
||||||
|
inverse[2][0] = b31 / det;
|
||||||
|
inverse[2][1] = b32 / det;
|
||||||
|
inverse[2][2] = b33 / det;
|
||||||
|
|
||||||
|
return inverse;
|
||||||
|
}
|
||||||
|
|
||||||
|
void main() {
|
||||||
|
vec3 p1 = vec3(f1, 1.0);
|
||||||
|
vec3 p2 = vec3(f2, 1.0);
|
||||||
|
vec3 p3 = vec3(f3, 1.0);
|
||||||
|
vec3 p4 = vec3(f4, 1.0);
|
||||||
|
vec3 q1 = vec3(t1, 1.0);
|
||||||
|
vec3 q2 = vec3(t2, 1.0);
|
||||||
|
vec3 q3 = vec3(t3, 1.0);
|
||||||
|
vec3 q4 = vec3(t4, 1.0);
|
||||||
|
|
||||||
|
mat3 A = mat3(p1, p2, p3);
|
||||||
|
vec3 b = p4;
|
||||||
|
vec3 x = m_inverse(A) * b;
|
||||||
|
vec3 h1 = x;
|
||||||
|
vec3 h2 = vec3(q2 - q1);
|
||||||
|
vec3 h3 = cross(h1, h2);
|
||||||
|
vec3 h4 = vec3(q3 - q1);
|
||||||
|
vec3 h5 = cross(h1, h4);
|
||||||
|
vec3 h6 = vec3(q4 - q1);
|
||||||
|
vec3 h7 = cross(h1, h6);
|
||||||
|
mat3 H = mat3(h2 / h3.x, h4 / h5.x, h6 / h7.x);
|
||||||
|
H[2][2] = 1.0 / h3.x;
|
||||||
|
|
||||||
|
vec3 coord = vec3(v_vTexcoord, 1.0);
|
||||||
|
vec3 newCoord = H * coord;
|
||||||
|
vec2 texCoord = newCoord.xy / newCoord.z;
|
||||||
|
|
||||||
|
gl_FragColor = texture2Dintp(gm_BaseTexture, texCoord);
|
||||||
|
}
|
10
shaders/sh_warp_4points_pers/sh_warp_4points_pers.yy
Normal file
10
shaders/sh_warp_4points_pers/sh_warp_4points_pers.yy
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
{
|
||||||
|
"resourceType": "GMShader",
|
||||||
|
"resourceVersion": "1.0",
|
||||||
|
"name": "sh_warp_4points_pers",
|
||||||
|
"parent": {
|
||||||
|
"name": "warp",
|
||||||
|
"path": "folders/shader/warp.yy",
|
||||||
|
},
|
||||||
|
"type": 1,
|
||||||
|
}
|
Binary file not shown.
After Width: | Height: | Size: 1.4 KiB |
Binary file not shown.
After Width: | Height: | Size: 1.4 KiB |
74
sprites/s_node_base_conversion/s_node_base_conversion.yy
Normal file
74
sprites/s_node_base_conversion/s_node_base_conversion.yy
Normal file
|
@ -0,0 +1,74 @@
|
||||||
|
{
|
||||||
|
"resourceType": "GMSprite",
|
||||||
|
"resourceVersion": "1.0",
|
||||||
|
"name": "s_node_base_conversion",
|
||||||
|
"bbox_bottom": 61,
|
||||||
|
"bbox_left": 5,
|
||||||
|
"bbox_right": 58,
|
||||||
|
"bbox_top": 2,
|
||||||
|
"bboxMode": 0,
|
||||||
|
"collisionKind": 1,
|
||||||
|
"collisionTolerance": 0,
|
||||||
|
"DynamicTexturePage": false,
|
||||||
|
"edgeFiltering": false,
|
||||||
|
"For3D": false,
|
||||||
|
"frames": [
|
||||||
|
{"resourceType":"GMSpriteFrame","resourceVersion":"1.1","name":"8f5ef343-0765-4267-8c9b-30f46b265120",},
|
||||||
|
],
|
||||||
|
"gridX": 0,
|
||||||
|
"gridY": 0,
|
||||||
|
"height": 64,
|
||||||
|
"HTile": false,
|
||||||
|
"layers": [
|
||||||
|
{"resourceType":"GMImageLayer","resourceVersion":"1.0","name":"d068b122-7d27-4f96-88b3-2dbdda1fe515","blendMode":0,"displayName":"default","isLocked":false,"opacity":100.0,"visible":true,},
|
||||||
|
],
|
||||||
|
"nineSlice": null,
|
||||||
|
"origin": 4,
|
||||||
|
"parent": {
|
||||||
|
"name": "number",
|
||||||
|
"path": "folders/nodes/icons/value/number.yy",
|
||||||
|
},
|
||||||
|
"preMultiplyAlpha": false,
|
||||||
|
"sequence": {
|
||||||
|
"resourceType": "GMSequence",
|
||||||
|
"resourceVersion": "1.4",
|
||||||
|
"name": "s_node_base_conversion",
|
||||||
|
"autoRecord": true,
|
||||||
|
"backdropHeight": 768,
|
||||||
|
"backdropImageOpacity": 0.5,
|
||||||
|
"backdropImagePath": "",
|
||||||
|
"backdropWidth": 1366,
|
||||||
|
"backdropXOffset": 0.0,
|
||||||
|
"backdropYOffset": 0.0,
|
||||||
|
"events": {"resourceType":"KeyframeStore<MessageEventKeyframe>","resourceVersion":"1.0","Keyframes":[],},
|
||||||
|
"eventStubScript": null,
|
||||||
|
"eventToFunction": {},
|
||||||
|
"length": 1.0,
|
||||||
|
"lockOrigin": false,
|
||||||
|
"moments": {"resourceType":"KeyframeStore<MomentsEventKeyframe>","resourceVersion":"1.0","Keyframes":[],},
|
||||||
|
"playback": 1,
|
||||||
|
"playbackSpeed": 30.0,
|
||||||
|
"playbackSpeedType": 0,
|
||||||
|
"showBackdrop": true,
|
||||||
|
"showBackdropImage": false,
|
||||||
|
"timeUnits": 1,
|
||||||
|
"tracks": [
|
||||||
|
{"resourceType":"GMSpriteFramesTrack","resourceVersion":"1.0","name":"frames","builtinName":0,"events":[],"inheritsTrackColour":true,"interpolation":1,"isCreationTrack":false,"keyframes":{"resourceType":"KeyframeStore<SpriteFrameKeyframe>","resourceVersion":"1.0","Keyframes":[
|
||||||
|
{"resourceType":"Keyframe<SpriteFrameKeyframe>","resourceVersion":"1.0","Channels":{"0":{"resourceType":"SpriteFrameKeyframe","resourceVersion":"1.0","Id":{"name":"8f5ef343-0765-4267-8c9b-30f46b265120","path":"sprites/s_node_base_conversion/s_node_base_conversion.yy",},},},"Disabled":false,"id":"49080284-00fd-46a8-942f-694d0b6874f1","IsCreationKey":false,"Key":0.0,"Length":1.0,"Stretch":false,},
|
||||||
|
],},"modifiers":[],"spriteId":null,"trackColour":0,"tracks":[],"traits":0,},
|
||||||
|
],
|
||||||
|
"visibleRange": null,
|
||||||
|
"volume": 1.0,
|
||||||
|
"xorigin": 32,
|
||||||
|
"yorigin": 32,
|
||||||
|
},
|
||||||
|
"swatchColours": null,
|
||||||
|
"swfPrecision": 2.525,
|
||||||
|
"textureGroupId": {
|
||||||
|
"name": "Default",
|
||||||
|
"path": "texturegroups/Default",
|
||||||
|
},
|
||||||
|
"type": 0,
|
||||||
|
"VTile": false,
|
||||||
|
"width": 64,
|
||||||
|
}
|
Binary file not shown.
After Width: | Height: | Size: 1.3 KiB |
Binary file not shown.
After Width: | Height: | Size: 1.3 KiB |
74
sprites/s_node_path_anchor/s_node_path_anchor.yy
Normal file
74
sprites/s_node_path_anchor/s_node_path_anchor.yy
Normal file
|
@ -0,0 +1,74 @@
|
||||||
|
{
|
||||||
|
"resourceType": "GMSprite",
|
||||||
|
"resourceVersion": "1.0",
|
||||||
|
"name": "s_node_path_anchor",
|
||||||
|
"bbox_bottom": 60,
|
||||||
|
"bbox_left": 3,
|
||||||
|
"bbox_right": 60,
|
||||||
|
"bbox_top": 3,
|
||||||
|
"bboxMode": 0,
|
||||||
|
"collisionKind": 1,
|
||||||
|
"collisionTolerance": 0,
|
||||||
|
"DynamicTexturePage": false,
|
||||||
|
"edgeFiltering": false,
|
||||||
|
"For3D": false,
|
||||||
|
"frames": [
|
||||||
|
{"resourceType":"GMSpriteFrame","resourceVersion":"1.1","name":"4cb2f931-05ab-4688-9386-ebb9abcb610f",},
|
||||||
|
],
|
||||||
|
"gridX": 0,
|
||||||
|
"gridY": 0,
|
||||||
|
"height": 64,
|
||||||
|
"HTile": false,
|
||||||
|
"layers": [
|
||||||
|
{"resourceType":"GMImageLayer","resourceVersion":"1.0","name":"b11b18ac-301f-4e35-b417-368060b829b6","blendMode":0,"displayName":"default","isLocked":false,"opacity":100.0,"visible":true,},
|
||||||
|
],
|
||||||
|
"nineSlice": null,
|
||||||
|
"origin": 4,
|
||||||
|
"parent": {
|
||||||
|
"name": "path",
|
||||||
|
"path": "folders/nodes/icons/value/path.yy",
|
||||||
|
},
|
||||||
|
"preMultiplyAlpha": false,
|
||||||
|
"sequence": {
|
||||||
|
"resourceType": "GMSequence",
|
||||||
|
"resourceVersion": "1.4",
|
||||||
|
"name": "s_node_path_anchor",
|
||||||
|
"autoRecord": true,
|
||||||
|
"backdropHeight": 768,
|
||||||
|
"backdropImageOpacity": 0.5,
|
||||||
|
"backdropImagePath": "",
|
||||||
|
"backdropWidth": 1366,
|
||||||
|
"backdropXOffset": 0.0,
|
||||||
|
"backdropYOffset": 0.0,
|
||||||
|
"events": {"resourceType":"KeyframeStore<MessageEventKeyframe>","resourceVersion":"1.0","Keyframes":[],},
|
||||||
|
"eventStubScript": null,
|
||||||
|
"eventToFunction": {},
|
||||||
|
"length": 1.0,
|
||||||
|
"lockOrigin": false,
|
||||||
|
"moments": {"resourceType":"KeyframeStore<MomentsEventKeyframe>","resourceVersion":"1.0","Keyframes":[],},
|
||||||
|
"playback": 1,
|
||||||
|
"playbackSpeed": 30.0,
|
||||||
|
"playbackSpeedType": 0,
|
||||||
|
"showBackdrop": true,
|
||||||
|
"showBackdropImage": false,
|
||||||
|
"timeUnits": 1,
|
||||||
|
"tracks": [
|
||||||
|
{"resourceType":"GMSpriteFramesTrack","resourceVersion":"1.0","name":"frames","builtinName":0,"events":[],"inheritsTrackColour":true,"interpolation":1,"isCreationTrack":false,"keyframes":{"resourceType":"KeyframeStore<SpriteFrameKeyframe>","resourceVersion":"1.0","Keyframes":[
|
||||||
|
{"resourceType":"Keyframe<SpriteFrameKeyframe>","resourceVersion":"1.0","Channels":{"0":{"resourceType":"SpriteFrameKeyframe","resourceVersion":"1.0","Id":{"name":"4cb2f931-05ab-4688-9386-ebb9abcb610f","path":"sprites/s_node_path_anchor/s_node_path_anchor.yy",},},},"Disabled":false,"id":"8269fa6b-95c8-404c-bf4f-c0cfc7b80e09","IsCreationKey":false,"Key":0.0,"Length":1.0,"Stretch":false,},
|
||||||
|
],},"modifiers":[],"spriteId":null,"trackColour":0,"tracks":[],"traits":0,},
|
||||||
|
],
|
||||||
|
"visibleRange": null,
|
||||||
|
"volume": 1.0,
|
||||||
|
"xorigin": 32,
|
||||||
|
"yorigin": 32,
|
||||||
|
},
|
||||||
|
"swatchColours": null,
|
||||||
|
"swfPrecision": 2.525,
|
||||||
|
"textureGroupId": {
|
||||||
|
"name": "Default",
|
||||||
|
"path": "texturegroups/Default",
|
||||||
|
},
|
||||||
|
"type": 0,
|
||||||
|
"VTile": false,
|
||||||
|
"width": 64,
|
||||||
|
}
|
Loading…
Add table
Reference in a new issue