mirror of
https://github.com/Ttanasart-pt/Pixel-Composer.git
synced 2025-01-23 11:28:06 +01:00
bugs
This commit is contained in:
parent
c8c6247907
commit
372107426e
43 changed files with 1379 additions and 116 deletions
|
@ -9,6 +9,8 @@
|
||||||
{"name":"GMD3D11","order":2,"path":"folders/_extensions/GMD3D11.yy",},
|
{"name":"GMD3D11","order":2,"path":"folders/_extensions/GMD3D11.yy",},
|
||||||
{"name":"MAC","order":3,"path":"folders/_extensions/MAC.yy",},
|
{"name":"MAC","order":3,"path":"folders/_extensions/MAC.yy",},
|
||||||
{"name":"patreon","order":4,"path":"folders/_extensions/patreon.yy",},
|
{"name":"patreon","order":4,"path":"folders/_extensions/patreon.yy",},
|
||||||
|
{"name":"SNAP","order":18,"path":"folders/_extensions/SNAP.yy",},
|
||||||
|
{"name":"XML","order":1,"path":"folders/_extensions/SNAP/XML.yy",},
|
||||||
{"name":"WinMan","order":5,"path":"folders/_extensions/WinMan.yy",},
|
{"name":"WinMan","order":5,"path":"folders/_extensions/WinMan.yy",},
|
||||||
{"name":"camera","order":7,"path":"folders/functions/3d/camera.yy",},
|
{"name":"camera","order":7,"path":"folders/functions/3d/camera.yy",},
|
||||||
{"name":"gizmo","order":8,"path":"folders/functions/3d/gizmo.yy",},
|
{"name":"gizmo","order":8,"path":"folders/functions/3d/gizmo.yy",},
|
||||||
|
@ -22,6 +24,7 @@
|
||||||
{"name":"Compat","order":6,"path":"folders/functions/fluid_sim/Compat.yy",},
|
{"name":"Compat","order":6,"path":"folders/functions/fluid_sim/Compat.yy",},
|
||||||
{"name":"Internal","order":7,"path":"folders/functions/fluid_sim/Internal.yy",},
|
{"name":"Internal","order":7,"path":"folders/functions/fluid_sim/Internal.yy",},
|
||||||
{"name":"Shaders","order":8,"path":"folders/functions/fluid_sim/Shaders.yy",},
|
{"name":"Shaders","order":8,"path":"folders/functions/fluid_sim/Shaders.yy",},
|
||||||
|
{"name":"svg","order":47,"path":"folders/functions/svg.yy",},
|
||||||
{"name":"dynamic_surface","order":8,"path":"folders/functions/surface/dynamic_surface.yy",},
|
{"name":"dynamic_surface","order":8,"path":"folders/functions/surface/dynamic_surface.yy",},
|
||||||
{"name":"__base__","order":11,"path":"folders/nodes/data/__base__.yy",},
|
{"name":"__base__","order":11,"path":"folders/nodes/data/__base__.yy",},
|
||||||
{"name":"3D","order":12,"path":"folders/nodes/data/3D.yy",},
|
{"name":"3D","order":12,"path":"folders/nodes/data/3D.yy",},
|
||||||
|
@ -56,6 +59,7 @@
|
||||||
{"name":"regions","order":19,"path":"folders/nodes/data/generator/regions.yy",},
|
{"name":"regions","order":19,"path":"folders/nodes/data/generator/regions.yy",},
|
||||||
{"name":"group","order":18,"path":"folders/nodes/data/group.yy",},
|
{"name":"group","order":18,"path":"folders/nodes/data/group.yy",},
|
||||||
{"name":"io","order":19,"path":"folders/nodes/data/io.yy",},
|
{"name":"io","order":19,"path":"folders/nodes/data/io.yy",},
|
||||||
|
{"name":"image","order":26,"path":"folders/nodes/data/io/image.yy",},
|
||||||
{"name":"network","order":22,"path":"folders/nodes/data/io/network.yy",},
|
{"name":"network","order":22,"path":"folders/nodes/data/io/network.yy",},
|
||||||
{"name":"iterate","order":20,"path":"folders/nodes/data/iterate.yy",},
|
{"name":"iterate","order":20,"path":"folders/nodes/data/iterate.yy",},
|
||||||
{"name":"_legacy","order":4,"path":"folders/nodes/data/iterate/_legacy.yy",},
|
{"name":"_legacy","order":4,"path":"folders/nodes/data/iterate/_legacy.yy",},
|
||||||
|
@ -791,10 +795,10 @@
|
||||||
{"name":"node_herringbone_tile","order":7,"path":"scripts/node_herringbone_tile/node_herringbone_tile.yy",},
|
{"name":"node_herringbone_tile","order":7,"path":"scripts/node_herringbone_tile/node_herringbone_tile.yy",},
|
||||||
{"name":"node_hlsl","order":13,"path":"scripts/node_hlsl/node_hlsl.yy",},
|
{"name":"node_hlsl","order":13,"path":"scripts/node_hlsl/node_hlsl.yy",},
|
||||||
{"name":"node_hsv_channel","order":1,"path":"scripts/node_hsv_channel/node_hsv_channel.yy",},
|
{"name":"node_hsv_channel","order":1,"path":"scripts/node_hsv_channel/node_hsv_channel.yy",},
|
||||||
{"name":"node_image_animated","order":2,"path":"scripts/node_image_animated/node_image_animated.yy",},
|
{"name":"node_image_animated","order":1,"path":"scripts/node_image_animated/node_image_animated.yy",},
|
||||||
{"name":"node_image_gif","order":5,"path":"scripts/node_image_gif/node_image_gif.yy",},
|
{"name":"node_image_gif","order":2,"path":"scripts/node_image_gif/node_image_gif.yy",},
|
||||||
{"name":"node_image_grid","order":3,"path":"scripts/node_image_grid/node_image_grid.yy",},
|
{"name":"node_image_grid","order":3,"path":"scripts/node_image_grid/node_image_grid.yy",},
|
||||||
{"name":"node_image_sequence","order":1,"path":"scripts/node_image_sequence/node_image_sequence.yy",},
|
{"name":"node_image_sequence","order":3,"path":"scripts/node_image_sequence/node_image_sequence.yy",},
|
||||||
{"name":"node_image_sheet","order":4,"path":"scripts/node_image_sheet/node_image_sheet.yy",},
|
{"name":"node_image_sheet","order":4,"path":"scripts/node_image_sheet/node_image_sheet.yy",},
|
||||||
{"name":"node_interpret_number","order":3,"path":"scripts/node_interpret_number/node_interpret_number.yy",},
|
{"name":"node_interpret_number","order":3,"path":"scripts/node_interpret_number/node_interpret_number.yy",},
|
||||||
{"name":"node_invert","order":6,"path":"scripts/node_invert/node_invert.yy",},
|
{"name":"node_invert","order":6,"path":"scripts/node_invert/node_invert.yy",},
|
||||||
|
@ -974,7 +978,7 @@
|
||||||
{"name":"node_scale","order":8,"path":"scripts/node_scale/node_scale.yy",},
|
{"name":"node_scale","order":8,"path":"scripts/node_scale/node_scale.yy",},
|
||||||
{"name":"node_scatter_points","order":6,"path":"scripts/node_scatter_points/node_scatter_points.yy",},
|
{"name":"node_scatter_points","order":6,"path":"scripts/node_scatter_points/node_scatter_points.yy",},
|
||||||
{"name":"node_scatter","order":6,"path":"scripts/node_scatter/node_scatter.yy",},
|
{"name":"node_scatter","order":6,"path":"scripts/node_scatter/node_scatter.yy",},
|
||||||
{"name":"node_sequence_anim","order":3,"path":"scripts/node_sequence_anim/node_sequence_anim.yy",},
|
{"name":"node_sequence_anim","order":5,"path":"scripts/node_sequence_anim/node_sequence_anim.yy",},
|
||||||
{"name":"node_shadow_cast","order":14,"path":"scripts/node_shadow_cast/node_shadow_cast.yy",},
|
{"name":"node_shadow_cast","order":14,"path":"scripts/node_shadow_cast/node_shadow_cast.yy",},
|
||||||
{"name":"node_shadow","order":13,"path":"scripts/node_shadow/node_shadow.yy",},
|
{"name":"node_shadow","order":13,"path":"scripts/node_shadow/node_shadow.yy",},
|
||||||
{"name":"node_shape_map","order":7,"path":"scripts/node_shape_map/node_shape_map.yy",},
|
{"name":"node_shape_map","order":7,"path":"scripts/node_shape_map/node_shape_map.yy",},
|
||||||
|
@ -1029,6 +1033,7 @@
|
||||||
{"name":"node_surface_from_buffer","order":2,"path":"scripts/node_surface_from_buffer/node_surface_from_buffer.yy",},
|
{"name":"node_surface_from_buffer","order":2,"path":"scripts/node_surface_from_buffer/node_surface_from_buffer.yy",},
|
||||||
{"name":"node_surface_replace","order":8,"path":"scripts/node_surface_replace/node_surface_replace.yy",},
|
{"name":"node_surface_replace","order":8,"path":"scripts/node_surface_replace/node_surface_replace.yy",},
|
||||||
{"name":"node_surface_to_color","order":1,"path":"scripts/node_surface_to_color/node_surface_to_color.yy",},
|
{"name":"node_surface_to_color","order":1,"path":"scripts/node_surface_to_color/node_surface_to_color.yy",},
|
||||||
|
{"name":"node_svg","order":6,"path":"scripts/node_svg/node_svg.yy",},
|
||||||
{"name":"node_switch","order":5,"path":"scripts/node_switch/node_switch.yy",},
|
{"name":"node_switch","order":5,"path":"scripts/node_switch/node_switch.yy",},
|
||||||
{"name":"node_terminal_trigger","order":25,"path":"scripts/node_terminal_trigger/node_terminal_trigger.yy",},
|
{"name":"node_terminal_trigger","order":25,"path":"scripts/node_terminal_trigger/node_terminal_trigger.yy",},
|
||||||
{"name":"node_text_file_read","order":6,"path":"scripts/node_text_file_read/node_text_file_read.yy",},
|
{"name":"node_text_file_read","order":6,"path":"scripts/node_text_file_read/node_text_file_read.yy",},
|
||||||
|
@ -1087,6 +1092,8 @@
|
||||||
{"name":"node_widget_test","order":16,"path":"scripts/node_widget_test/node_widget_test.yy",},
|
{"name":"node_widget_test","order":16,"path":"scripts/node_widget_test/node_widget_test.yy",},
|
||||||
{"name":"node_wrap_area","order":10,"path":"scripts/node_wrap_area/node_wrap_area.yy",},
|
{"name":"node_wrap_area","order":10,"path":"scripts/node_wrap_area/node_wrap_area.yy",},
|
||||||
{"name":"node_wrap_perspective","order":15,"path":"scripts/node_wrap_perspective/node_wrap_perspective.yy",},
|
{"name":"node_wrap_perspective","order":15,"path":"scripts/node_wrap_perspective/node_wrap_perspective.yy",},
|
||||||
|
{"name":"node_xml_file_read","order":24,"path":"scripts/node_xml_file_read/node_xml_file_read.yy",},
|
||||||
|
{"name":"node_xml_file_write","order":25,"path":"scripts/node_xml_file_write/node_xml_file_write.yy",},
|
||||||
{"name":"node_zigzag","order":5,"path":"scripts/node_zigzag/node_zigzag.yy",},
|
{"name":"node_zigzag","order":5,"path":"scripts/node_zigzag/node_zigzag.yy",},
|
||||||
{"name":"nodeValue_drawer","order":1,"path":"scripts/nodeValue_drawer/nodeValue_drawer.yy",},
|
{"name":"nodeValue_drawer","order":1,"path":"scripts/nodeValue_drawer/nodeValue_drawer.yy",},
|
||||||
{"name":"note_data","order":19,"path":"scripts/note_data/note_data.yy",},
|
{"name":"note_data","order":19,"path":"scripts/note_data/note_data.yy",},
|
||||||
|
@ -1173,6 +1180,9 @@
|
||||||
{"name":"scrollPane","order":3,"path":"scripts/scrollPane/scrollPane.yy",},
|
{"name":"scrollPane","order":3,"path":"scripts/scrollPane/scrollPane.yy",},
|
||||||
{"name":"shell_functions","order":20,"path":"scripts/shell_functions/shell_functions.yy",},
|
{"name":"shell_functions","order":20,"path":"scripts/shell_functions/shell_functions.yy",},
|
||||||
{"name":"sliderRange","order":2,"path":"scripts/sliderRange/sliderRange.yy",},
|
{"name":"sliderRange","order":2,"path":"scripts/sliderRange/sliderRange.yy",},
|
||||||
|
{"name":"SnapBufferWriteXML","order":1,"path":"scripts/SnapBufferWriteXML/SnapBufferWriteXML.yy",},
|
||||||
|
{"name":"SnapFromXML","order":2,"path":"scripts/SnapFromXML/SnapFromXML.yy",},
|
||||||
|
{"name":"SnapToXML","order":3,"path":"scripts/SnapToXML/SnapToXML.yy",},
|
||||||
{"name":"sprite_loader","order":11,"path":"scripts/sprite_loader/sprite_loader.yy",},
|
{"name":"sprite_loader","order":11,"path":"scripts/sprite_loader/sprite_loader.yy",},
|
||||||
{"name":"stack_functions","order":7,"path":"scripts/stack_functions/stack_functions.yy",},
|
{"name":"stack_functions","order":7,"path":"scripts/stack_functions/stack_functions.yy",},
|
||||||
{"name":"steam_ugc_project","order":1,"path":"scripts/steam_ugc_project/steam_ugc_project.yy",},
|
{"name":"steam_ugc_project","order":1,"path":"scripts/steam_ugc_project/steam_ugc_project.yy",},
|
||||||
|
@ -1187,6 +1197,7 @@
|
||||||
{"name":"surface_functions","order":4,"path":"scripts/surface_functions/surface_functions.yy",},
|
{"name":"surface_functions","order":4,"path":"scripts/surface_functions/surface_functions.yy",},
|
||||||
{"name":"surface_get_palette","order":2,"path":"scripts/surface_get_palette/surface_get_palette.yy",},
|
{"name":"surface_get_palette","order":2,"path":"scripts/surface_get_palette/surface_get_palette.yy",},
|
||||||
{"name":"surfaceBox","order":4,"path":"scripts/surfaceBox/surfaceBox.yy",},
|
{"name":"surfaceBox","order":4,"path":"scripts/surfaceBox/surfaceBox.yy",},
|
||||||
|
{"name":"svg_objects","order":1,"path":"scripts/svg_objects/svg_objects.yy",},
|
||||||
{"name":"text_file","order":5,"path":"scripts/text_file/text_file.yy",},
|
{"name":"text_file","order":5,"path":"scripts/text_file/text_file.yy",},
|
||||||
{"name":"textArrayBox","order":1,"path":"scripts/textArrayBox/textArrayBox.yy",},
|
{"name":"textArrayBox","order":1,"path":"scripts/textArrayBox/textArrayBox.yy",},
|
||||||
{"name":"textBox","order":2,"path":"scripts/textBox/textBox.yy",},
|
{"name":"textBox","order":2,"path":"scripts/textBox/textBox.yy",},
|
||||||
|
@ -2040,6 +2051,8 @@
|
||||||
{"name":"s_node_websocket_send","order":21,"path":"sprites/s_node_websocket_send/s_node_websocket_send.yy",},
|
{"name":"s_node_websocket_send","order":21,"path":"sprites/s_node_websocket_send/s_node_websocket_send.yy",},
|
||||||
{"name":"s_node_websocket","order":18,"path":"sprites/s_node_websocket/s_node_websocket.yy",},
|
{"name":"s_node_websocket","order":18,"path":"sprites/s_node_websocket/s_node_websocket.yy",},
|
||||||
{"name":"s_node_wiggler","order":2,"path":"sprites/s_node_wiggler/s_node_wiggler.yy",},
|
{"name":"s_node_wiggler","order":2,"path":"sprites/s_node_wiggler/s_node_wiggler.yy",},
|
||||||
|
{"name":"s_node_xml_file_read","order":37,"path":"sprites/s_node_xml_file_read/s_node_xml_file_read.yy",},
|
||||||
|
{"name":"s_node_xml_file_write","order":36,"path":"sprites/s_node_xml_file_write/s_node_xml_file_write.yy",},
|
||||||
{"name":"s_node_zigzag","order":18,"path":"sprites/s_node_zigzag/s_node_zigzag.yy",},
|
{"name":"s_node_zigzag","order":18,"path":"sprites/s_node_zigzag/s_node_zigzag.yy",},
|
||||||
{"name":"s_node_zoom","order":59,"path":"sprites/s_node_zoom/s_node_zoom.yy",},
|
{"name":"s_node_zoom","order":59,"path":"sprites/s_node_zoom/s_node_zoom.yy",},
|
||||||
{"name":"s_patreon_banner","order":3,"path":"sprites/s_patreon_banner/s_patreon_banner.yy",},
|
{"name":"s_patreon_banner","order":3,"path":"sprites/s_patreon_banner/s_patreon_banner.yy",},
|
||||||
|
|
|
@ -35,6 +35,8 @@
|
||||||
{"$GMFolder":"","%Name":"GMD3D11","folderPath":"folders/_extensions/GMD3D11.yy","name":"GMD3D11","resourceType":"GMFolder","resourceVersion":"2.0",},
|
{"$GMFolder":"","%Name":"GMD3D11","folderPath":"folders/_extensions/GMD3D11.yy","name":"GMD3D11","resourceType":"GMFolder","resourceVersion":"2.0",},
|
||||||
{"$GMFolder":"","%Name":"MAC","folderPath":"folders/_extensions/MAC.yy","name":"MAC","resourceType":"GMFolder","resourceVersion":"2.0",},
|
{"$GMFolder":"","%Name":"MAC","folderPath":"folders/_extensions/MAC.yy","name":"MAC","resourceType":"GMFolder","resourceVersion":"2.0",},
|
||||||
{"$GMFolder":"","%Name":"patreon","folderPath":"folders/_extensions/patreon.yy","name":"patreon","resourceType":"GMFolder","resourceVersion":"2.0",},
|
{"$GMFolder":"","%Name":"patreon","folderPath":"folders/_extensions/patreon.yy","name":"patreon","resourceType":"GMFolder","resourceVersion":"2.0",},
|
||||||
|
{"$GMFolder":"","%Name":"SNAP","folderPath":"folders/_extensions/SNAP.yy","name":"SNAP","resourceType":"GMFolder","resourceVersion":"2.0",},
|
||||||
|
{"$GMFolder":"","%Name":"XML","folderPath":"folders/_extensions/SNAP/XML.yy","name":"XML","resourceType":"GMFolder","resourceVersion":"2.0",},
|
||||||
{"$GMFolder":"","%Name":"WinMan","folderPath":"folders/_extensions/WinMan.yy","name":"WinMan","resourceType":"GMFolder","resourceVersion":"2.0",},
|
{"$GMFolder":"","%Name":"WinMan","folderPath":"folders/_extensions/WinMan.yy","name":"WinMan","resourceType":"GMFolder","resourceVersion":"2.0",},
|
||||||
{"$GMFolder":"","%Name":"addons","folderPath":"folders/addons.yy","name":"addons","resourceType":"GMFolder","resourceVersion":"2.0",},
|
{"$GMFolder":"","%Name":"addons","folderPath":"folders/addons.yy","name":"addons","resourceType":"GMFolder","resourceVersion":"2.0",},
|
||||||
{"$GMFolder":"","%Name":"custom","folderPath":"folders/addons/custom.yy","name":"custom","resourceType":"GMFolder","resourceVersion":"2.0",},
|
{"$GMFolder":"","%Name":"custom","folderPath":"folders/addons/custom.yy","name":"custom","resourceType":"GMFolder","resourceVersion":"2.0",},
|
||||||
|
@ -88,6 +90,7 @@
|
||||||
{"$GMFolder":"","%Name":"Shaders","folderPath":"folders/functions/fluid_sim/Shaders.yy","name":"Shaders","resourceType":"GMFolder","resourceVersion":"2.0",},
|
{"$GMFolder":"","%Name":"Shaders","folderPath":"folders/functions/fluid_sim/Shaders.yy","name":"Shaders","resourceType":"GMFolder","resourceVersion":"2.0",},
|
||||||
{"$GMFolder":"","%Name":"geometry","folderPath":"folders/functions/geometry.yy","name":"geometry","resourceType":"GMFolder","resourceVersion":"2.0",},
|
{"$GMFolder":"","%Name":"geometry","folderPath":"folders/functions/geometry.yy","name":"geometry","resourceType":"GMFolder","resourceVersion":"2.0",},
|
||||||
{"$GMFolder":"","%Name":"GLSL","folderPath":"folders/functions/GLSL.yy","name":"GLSL","resourceType":"GMFolder","resourceVersion":"2.0",},
|
{"$GMFolder":"","%Name":"GLSL","folderPath":"folders/functions/GLSL.yy","name":"GLSL","resourceType":"GMFolder","resourceVersion":"2.0",},
|
||||||
|
{"$GMFolder":"","%Name":"svg","folderPath":"folders/functions/svg.yy","name":"svg","resourceType":"GMFolder","resourceVersion":"2.0",},
|
||||||
{"$GMFolder":"","%Name":"importers","folderPath":"folders/functions/importers.yy","name":"importers","resourceType":"GMFolder","resourceVersion":"2.0",},
|
{"$GMFolder":"","%Name":"importers","folderPath":"folders/functions/importers.yy","name":"importers","resourceType":"GMFolder","resourceVersion":"2.0",},
|
||||||
{"$GMFolder":"","%Name":"inputs","folderPath":"folders/functions/inputs.yy","name":"inputs","resourceType":"GMFolder","resourceVersion":"2.0",},
|
{"$GMFolder":"","%Name":"inputs","folderPath":"folders/functions/inputs.yy","name":"inputs","resourceType":"GMFolder","resourceVersion":"2.0",},
|
||||||
{"$GMFolder":"","%Name":"lua","folderPath":"folders/functions/lua.yy","name":"lua","resourceType":"GMFolder","resourceVersion":"2.0",},
|
{"$GMFolder":"","%Name":"lua","folderPath":"folders/functions/lua.yy","name":"lua","resourceType":"GMFolder","resourceVersion":"2.0",},
|
||||||
|
@ -154,6 +157,7 @@
|
||||||
{"$GMFolder":"","%Name":"regions","folderPath":"folders/nodes/data/generator/regions.yy","name":"regions","resourceType":"GMFolder","resourceVersion":"2.0",},
|
{"$GMFolder":"","%Name":"regions","folderPath":"folders/nodes/data/generator/regions.yy","name":"regions","resourceType":"GMFolder","resourceVersion":"2.0",},
|
||||||
{"$GMFolder":"","%Name":"group","folderPath":"folders/nodes/data/group.yy","name":"group","resourceType":"GMFolder","resourceVersion":"2.0",},
|
{"$GMFolder":"","%Name":"group","folderPath":"folders/nodes/data/group.yy","name":"group","resourceType":"GMFolder","resourceVersion":"2.0",},
|
||||||
{"$GMFolder":"","%Name":"io","folderPath":"folders/nodes/data/io.yy","name":"io","resourceType":"GMFolder","resourceVersion":"2.0",},
|
{"$GMFolder":"","%Name":"io","folderPath":"folders/nodes/data/io.yy","name":"io","resourceType":"GMFolder","resourceVersion":"2.0",},
|
||||||
|
{"$GMFolder":"","%Name":"image","folderPath":"folders/nodes/data/io/image.yy","name":"image","resourceType":"GMFolder","resourceVersion":"2.0",},
|
||||||
{"$GMFolder":"","%Name":"network","folderPath":"folders/nodes/data/io/network.yy","name":"network","resourceType":"GMFolder","resourceVersion":"2.0",},
|
{"$GMFolder":"","%Name":"network","folderPath":"folders/nodes/data/io/network.yy","name":"network","resourceType":"GMFolder","resourceVersion":"2.0",},
|
||||||
{"$GMFolder":"","%Name":"iterate","folderPath":"folders/nodes/data/iterate.yy","name":"iterate","resourceType":"GMFolder","resourceVersion":"2.0",},
|
{"$GMFolder":"","%Name":"iterate","folderPath":"folders/nodes/data/iterate.yy","name":"iterate","resourceType":"GMFolder","resourceVersion":"2.0",},
|
||||||
{"$GMFolder":"","%Name":"_legacy","folderPath":"folders/nodes/data/iterate/_legacy.yy","name":"_legacy","resourceType":"GMFolder","resourceVersion":"2.0",},
|
{"$GMFolder":"","%Name":"_legacy","folderPath":"folders/nodes/data/iterate/_legacy.yy","name":"_legacy","resourceType":"GMFolder","resourceVersion":"2.0",},
|
||||||
|
@ -466,6 +470,8 @@
|
||||||
{"$GMIncludedFile":"","%Name":"CommonPS.hlsl","CopyToMask":-1,"filePath":"datafiles/Shaders/3dInstance","name":"CommonPS.hlsl","resourceType":"GMIncludedFile","resourceVersion":"2.0",},
|
{"$GMIncludedFile":"","%Name":"CommonPS.hlsl","CopyToMask":-1,"filePath":"datafiles/Shaders/3dInstance","name":"CommonPS.hlsl","resourceType":"GMIncludedFile","resourceVersion":"2.0",},
|
||||||
{"$GMIncludedFile":"","%Name":"CommonVS.hlsl","CopyToMask":-1,"filePath":"datafiles/Shaders/3dInstance","name":"CommonVS.hlsl","resourceType":"GMIncludedFile","resourceVersion":"2.0",},
|
{"$GMIncludedFile":"","%Name":"CommonVS.hlsl","CopyToMask":-1,"filePath":"datafiles/Shaders/3dInstance","name":"CommonVS.hlsl","resourceType":"GMIncludedFile","resourceVersion":"2.0",},
|
||||||
{"$GMIncludedFile":"","%Name":"rubber_duck_toy_1k.bin","CopyToMask":-1,"filePath":"datafiles/Shaders/3dInstance","name":"rubber_duck_toy_1k.bin","resourceType":"GMIncludedFile","resourceVersion":"2.0",},
|
{"$GMIncludedFile":"","%Name":"rubber_duck_toy_1k.bin","CopyToMask":-1,"filePath":"datafiles/Shaders/3dInstance","name":"rubber_duck_toy_1k.bin","resourceType":"GMIncludedFile","resourceVersion":"2.0",},
|
||||||
|
{"$GMIncludedFile":"","%Name":"snap_license.txt","CopyToMask":-1,"filePath":"datafiles","name":"snap_license.txt","resourceType":"GMIncludedFile","resourceVersion":"2.0",},
|
||||||
|
{"$GMIncludedFile":"","%Name":"snap_license.txt","CopyToMask":-1,"filePath":"datafiles","name":"snap_license.txt","resourceType":"GMIncludedFile","resourceVersion":"2.0",},
|
||||||
{"$GMIncludedFile":"","%Name":"ucrtbased.dll","ConfigValues":{},"CopyToMask":-1,"filePath":"datafiles","name":"ucrtbased.dll","resourceType":"GMIncludedFile","resourceVersion":"2.0",},
|
{"$GMIncludedFile":"","%Name":"ucrtbased.dll","ConfigValues":{},"CopyToMask":-1,"filePath":"datafiles","name":"ucrtbased.dll","resourceType":"GMIncludedFile","resourceVersion":"2.0",},
|
||||||
{"$GMIncludedFile":"","%Name":"webpmux.exe","CopyToMask":-1,"filePath":"datafiles/webp","name":"webpmux.exe","resourceType":"GMIncludedFile","resourceVersion":"2.0",},
|
{"$GMIncludedFile":"","%Name":"webpmux.exe","CopyToMask":-1,"filePath":"datafiles/webp","name":"webpmux.exe","resourceType":"GMIncludedFile","resourceVersion":"2.0",},
|
||||||
{"$GMIncludedFile":"","%Name":"Welcome files.zip","CopyToMask":-1,"filePath":"datafiles","name":"Welcome files.zip","resourceType":"GMIncludedFile","resourceVersion":"2.0",},
|
{"$GMIncludedFile":"","%Name":"Welcome files.zip","CopyToMask":-1,"filePath":"datafiles","name":"Welcome files.zip","resourceType":"GMIncludedFile","resourceVersion":"2.0",},
|
||||||
|
@ -1482,6 +1488,7 @@
|
||||||
{"id":{"name":"node_surface_replace","path":"scripts/node_surface_replace/node_surface_replace.yy",},},
|
{"id":{"name":"node_surface_replace","path":"scripts/node_surface_replace/node_surface_replace.yy",},},
|
||||||
{"id":{"name":"node_surface_to_buffer","path":"scripts/node_surface_to_buffer/node_surface_to_buffer.yy",},},
|
{"id":{"name":"node_surface_to_buffer","path":"scripts/node_surface_to_buffer/node_surface_to_buffer.yy",},},
|
||||||
{"id":{"name":"node_surface_to_color","path":"scripts/node_surface_to_color/node_surface_to_color.yy",},},
|
{"id":{"name":"node_surface_to_color","path":"scripts/node_surface_to_color/node_surface_to_color.yy",},},
|
||||||
|
{"id":{"name":"node_svg","path":"scripts/node_svg/node_svg.yy",},},
|
||||||
{"id":{"name":"node_switch","path":"scripts/node_switch/node_switch.yy",},},
|
{"id":{"name":"node_switch","path":"scripts/node_switch/node_switch.yy",},},
|
||||||
{"id":{"name":"node_terminal_trigger","path":"scripts/node_terminal_trigger/node_terminal_trigger.yy",},},
|
{"id":{"name":"node_terminal_trigger","path":"scripts/node_terminal_trigger/node_terminal_trigger.yy",},},
|
||||||
{"id":{"name":"node_text_file_read","path":"scripts/node_text_file_read/node_text_file_read.yy",},},
|
{"id":{"name":"node_text_file_read","path":"scripts/node_text_file_read/node_text_file_read.yy",},},
|
||||||
|
@ -1546,6 +1553,8 @@
|
||||||
{"id":{"name":"node_widget_test","path":"scripts/node_widget_test/node_widget_test.yy",},},
|
{"id":{"name":"node_widget_test","path":"scripts/node_widget_test/node_widget_test.yy",},},
|
||||||
{"id":{"name":"node_wrap_area","path":"scripts/node_wrap_area/node_wrap_area.yy",},},
|
{"id":{"name":"node_wrap_area","path":"scripts/node_wrap_area/node_wrap_area.yy",},},
|
||||||
{"id":{"name":"node_wrap_perspective","path":"scripts/node_wrap_perspective/node_wrap_perspective.yy",},},
|
{"id":{"name":"node_wrap_perspective","path":"scripts/node_wrap_perspective/node_wrap_perspective.yy",},},
|
||||||
|
{"id":{"name":"node_xml_file_read","path":"scripts/node_xml_file_read/node_xml_file_read.yy",},},
|
||||||
|
{"id":{"name":"node_xml_file_write","path":"scripts/node_xml_file_write/node_xml_file_write.yy",},},
|
||||||
{"id":{"name":"node_zigzag","path":"scripts/node_zigzag/node_zigzag.yy",},},
|
{"id":{"name":"node_zigzag","path":"scripts/node_zigzag/node_zigzag.yy",},},
|
||||||
{"id":{"name":"nodeValue_drawer","path":"scripts/nodeValue_drawer/nodeValue_drawer.yy",},},
|
{"id":{"name":"nodeValue_drawer","path":"scripts/nodeValue_drawer/nodeValue_drawer.yy",},},
|
||||||
{"id":{"name":"note_data","path":"scripts/note_data/note_data.yy",},},
|
{"id":{"name":"note_data","path":"scripts/note_data/note_data.yy",},},
|
||||||
|
@ -1651,6 +1660,10 @@
|
||||||
{"id":{"name":"shell_functions","path":"scripts/shell_functions/shell_functions.yy",},},
|
{"id":{"name":"shell_functions","path":"scripts/shell_functions/shell_functions.yy",},},
|
||||||
{"id":{"name":"slider","path":"scripts/slider/slider.yy",},},
|
{"id":{"name":"slider","path":"scripts/slider/slider.yy",},},
|
||||||
{"id":{"name":"sliderRange","path":"scripts/sliderRange/sliderRange.yy",},},
|
{"id":{"name":"sliderRange","path":"scripts/sliderRange/sliderRange.yy",},},
|
||||||
|
{"id":{"name":"SnapBufferReadXML","path":"scripts/SnapBufferReadXML/SnapBufferReadXML.yy",},},
|
||||||
|
{"id":{"name":"SnapBufferWriteXML","path":"scripts/SnapBufferWriteXML/SnapBufferWriteXML.yy",},},
|
||||||
|
{"id":{"name":"SnapFromXML","path":"scripts/SnapFromXML/SnapFromXML.yy",},},
|
||||||
|
{"id":{"name":"SnapToXML","path":"scripts/SnapToXML/SnapToXML.yy",},},
|
||||||
{"id":{"name":"sprite_add_functions","path":"scripts/sprite_add_functions/sprite_add_functions.yy",},},
|
{"id":{"name":"sprite_add_functions","path":"scripts/sprite_add_functions/sprite_add_functions.yy",},},
|
||||||
{"id":{"name":"sprite_loader","path":"scripts/sprite_loader/sprite_loader.yy",},},
|
{"id":{"name":"sprite_loader","path":"scripts/sprite_loader/sprite_loader.yy",},},
|
||||||
{"id":{"name":"stack_functions","path":"scripts/stack_functions/stack_functions.yy",},},
|
{"id":{"name":"stack_functions","path":"scripts/stack_functions/stack_functions.yy",},},
|
||||||
|
@ -1669,6 +1682,8 @@
|
||||||
{"id":{"name":"surface_functions","path":"scripts/surface_functions/surface_functions.yy",},},
|
{"id":{"name":"surface_functions","path":"scripts/surface_functions/surface_functions.yy",},},
|
||||||
{"id":{"name":"surface_get_palette","path":"scripts/surface_get_palette/surface_get_palette.yy",},},
|
{"id":{"name":"surface_get_palette","path":"scripts/surface_get_palette/surface_get_palette.yy",},},
|
||||||
{"id":{"name":"surfaceBox","path":"scripts/surfaceBox/surfaceBox.yy",},},
|
{"id":{"name":"surfaceBox","path":"scripts/surfaceBox/surfaceBox.yy",},},
|
||||||
|
{"id":{"name":"svg_objects","path":"scripts/svg_objects/svg_objects.yy",},},
|
||||||
|
{"id":{"name":"svg_reader","path":"scripts/svg_reader/svg_reader.yy",},},
|
||||||
{"id":{"name":"testing_script","path":"scripts/testing_script/testing_script.yy",},},
|
{"id":{"name":"testing_script","path":"scripts/testing_script/testing_script.yy",},},
|
||||||
{"id":{"name":"text_file","path":"scripts/text_file/text_file.yy",},},
|
{"id":{"name":"text_file","path":"scripts/text_file/text_file.yy",},},
|
||||||
{"id":{"name":"textArea","path":"scripts/textArea/textArea.yy",},},
|
{"id":{"name":"textArea","path":"scripts/textArea/textArea.yy",},},
|
||||||
|
@ -2618,6 +2633,8 @@
|
||||||
{"id":{"name":"s_node_websocket_send","path":"sprites/s_node_websocket_send/s_node_websocket_send.yy",},},
|
{"id":{"name":"s_node_websocket_send","path":"sprites/s_node_websocket_send/s_node_websocket_send.yy",},},
|
||||||
{"id":{"name":"s_node_websocket","path":"sprites/s_node_websocket/s_node_websocket.yy",},},
|
{"id":{"name":"s_node_websocket","path":"sprites/s_node_websocket/s_node_websocket.yy",},},
|
||||||
{"id":{"name":"s_node_wiggler","path":"sprites/s_node_wiggler/s_node_wiggler.yy",},},
|
{"id":{"name":"s_node_wiggler","path":"sprites/s_node_wiggler/s_node_wiggler.yy",},},
|
||||||
|
{"id":{"name":"s_node_xml_file_read","path":"sprites/s_node_xml_file_read/s_node_xml_file_read.yy",},},
|
||||||
|
{"id":{"name":"s_node_xml_file_write","path":"sprites/s_node_xml_file_write/s_node_xml_file_write.yy",},},
|
||||||
{"id":{"name":"s_node_zigzag","path":"sprites/s_node_zigzag/s_node_zigzag.yy",},},
|
{"id":{"name":"s_node_zigzag","path":"sprites/s_node_zigzag/s_node_zigzag.yy",},},
|
||||||
{"id":{"name":"s_node_zoom","path":"sprites/s_node_zoom/s_node_zoom.yy",},},
|
{"id":{"name":"s_node_zoom","path":"sprites/s_node_zoom/s_node_zoom.yy",},},
|
||||||
{"id":{"name":"s_patreon_banner","path":"sprites/s_patreon_banner/s_patreon_banner.yy",},},
|
{"id":{"name":"s_patreon_banner","path":"sprites/s_patreon_banner/s_patreon_banner.yy",},},
|
||||||
|
|
21
datafiles/snap_license.txt
Normal file
21
datafiles/snap_license.txt
Normal file
|
@ -0,0 +1,21 @@
|
||||||
|
MIT License
|
||||||
|
|
||||||
|
Copyright (c) 2024 Julian Adams
|
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
in the Software without restriction, including without limitation the rights
|
||||||
|
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
|
copies of the Software, and to permit persons to whom the Software is
|
||||||
|
furnished to do so, subject to the following conditions:
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be included in all
|
||||||
|
copies or substantial portions of the Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||||
|
SOFTWARE.
|
|
@ -210,6 +210,14 @@
|
||||||
node = Node_create_WAV_File_Read_path(_x, _y, p);
|
node = Node_create_WAV_File_Read_path(_x, _y, p);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case "xml" :
|
||||||
|
node = Node_create_XML_File_Read_path(_x, _y, p);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case "svg" :
|
||||||
|
node = Node_create_SVG_path(_x, _y, p);
|
||||||
|
break;
|
||||||
|
|
||||||
case "pxc" :
|
case "pxc" :
|
||||||
case "cpxc" :
|
case "cpxc" :
|
||||||
LOAD_PATH(p);
|
LOAD_PATH(p);
|
||||||
|
|
306
scripts/SnapBufferReadXML/SnapBufferReadXML.gml
Normal file
306
scripts/SnapBufferReadXML/SnapBufferReadXML.gml
Normal file
|
@ -0,0 +1,306 @@
|
||||||
|
// Feather disable all
|
||||||
|
/// Decodes XML data stored in a buffer and outputs a sorta-JSON equivalent
|
||||||
|
///
|
||||||
|
/// @return Nested struct/array data that represents the contents of the XML data
|
||||||
|
///
|
||||||
|
/// @param buffer Buffer to read data from
|
||||||
|
/// @param offset Offset in the buffer to read data from
|
||||||
|
///
|
||||||
|
/// @jujuadams 2022-10-30
|
||||||
|
|
||||||
|
function SnapBufferReadXML(_buffer, _offset, _size)
|
||||||
|
{
|
||||||
|
var _oldOffset = buffer_tell(_buffer);
|
||||||
|
buffer_seek(_buffer, buffer_seek_start, _offset);
|
||||||
|
|
||||||
|
var _skip_whitespace = true;
|
||||||
|
|
||||||
|
var _in_key = false;
|
||||||
|
var _key_start = -1;
|
||||||
|
var _key = "";
|
||||||
|
|
||||||
|
var _in_value = false;
|
||||||
|
var _in_string = false;
|
||||||
|
var _string_start = 0;
|
||||||
|
var _value = "";
|
||||||
|
|
||||||
|
var _in_text = false;
|
||||||
|
var _text = "";
|
||||||
|
var _text_has_ampersand = false;
|
||||||
|
var _text_start = 0;
|
||||||
|
|
||||||
|
var _in_tag = false;
|
||||||
|
var _tag = undefined;
|
||||||
|
var _tag_terminating = false;
|
||||||
|
var _tag_self_terminating = false;
|
||||||
|
var _tag_is_prolog = false;
|
||||||
|
var _tag_is_comment = false;
|
||||||
|
var _tag_terminating = false;
|
||||||
|
var _tag_start = 0;
|
||||||
|
var _tag_reading_attributes = false;
|
||||||
|
var _tag_has_attributes = false;
|
||||||
|
|
||||||
|
var _root = {
|
||||||
|
type: "root",
|
||||||
|
};
|
||||||
|
|
||||||
|
var _stack_parent = undefined;
|
||||||
|
var _stack_top =_root;
|
||||||
|
var _stack = ds_list_create();
|
||||||
|
ds_list_add(_stack, _stack_top);
|
||||||
|
|
||||||
|
repeat(_size)
|
||||||
|
{
|
||||||
|
var _value = buffer_read(_buffer, buffer_u8);
|
||||||
|
|
||||||
|
if (_skip_whitespace && (_value > 32)) _skip_whitespace = false;
|
||||||
|
|
||||||
|
if (!_skip_whitespace)
|
||||||
|
{
|
||||||
|
if (_in_tag)
|
||||||
|
{
|
||||||
|
if (_in_key)
|
||||||
|
{
|
||||||
|
if ((_value == ord("/")) || (_value == ord("?")))
|
||||||
|
{
|
||||||
|
_in_key = false;
|
||||||
|
if (_value == ord("/")) _tag_terminating = true;
|
||||||
|
}
|
||||||
|
else if ((_value == ord(" ")) || (_value == ord("=")))
|
||||||
|
{
|
||||||
|
buffer_poke(_buffer, buffer_tell(_buffer)-1, buffer_u8, 0x0);
|
||||||
|
buffer_seek(_buffer, buffer_seek_start, _key_start);
|
||||||
|
_key = buffer_read(_buffer, buffer_string);
|
||||||
|
|
||||||
|
_in_key = false;
|
||||||
|
_in_value = true;
|
||||||
|
}
|
||||||
|
else if (_key_start < 0)
|
||||||
|
{
|
||||||
|
_key_start = buffer_tell(_buffer) - 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (_in_value)
|
||||||
|
{
|
||||||
|
if (_in_string)
|
||||||
|
{
|
||||||
|
if (_value == ord("&")) //Check for ampersands so we can trigger a find-replace on the output value
|
||||||
|
{
|
||||||
|
_text_has_ampersand = true;
|
||||||
|
}
|
||||||
|
else if (_value == ord("\"")) //End string
|
||||||
|
{
|
||||||
|
buffer_poke(_buffer, buffer_tell(_buffer)-1, buffer_u8, 0x0);
|
||||||
|
buffer_seek(_buffer, buffer_seek_start, _string_start);
|
||||||
|
var _substring = buffer_read(_buffer, buffer_string);
|
||||||
|
|
||||||
|
if (_text_has_ampersand) //Only run these checks if we found an ampersand
|
||||||
|
{
|
||||||
|
_substring = string_replace_all(_substring, "<" , "<");
|
||||||
|
_substring = string_replace_all(_substring, ">" , ">");
|
||||||
|
_substring = string_replace_all(_substring, "&" , "&");
|
||||||
|
_substring = string_replace_all(_substring, "'", "'");
|
||||||
|
_substring = string_replace_all(_substring, """, "\"");
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!_tag_is_comment)
|
||||||
|
{
|
||||||
|
if (!variable_struct_exists(_stack_top, "attributes")) _stack_top.attributes = {};
|
||||||
|
_stack_top.attributes[$ _key] = _substring;
|
||||||
|
}
|
||||||
|
|
||||||
|
_in_key = true;
|
||||||
|
_key_start = -1;
|
||||||
|
_in_string = false;
|
||||||
|
_skip_whitespace = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (_value == ord("\"")) //Start the value reading at the quote mark
|
||||||
|
{
|
||||||
|
_in_string = true;
|
||||||
|
_string_start = buffer_tell(_buffer);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
switch(_value)
|
||||||
|
{
|
||||||
|
case ord("?"): //Prolog indicator
|
||||||
|
if (buffer_tell(_buffer) == _tag_start + 1) _tag_is_prolog = true;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case ord("!"): //Comment indicator
|
||||||
|
if (buffer_tell(_buffer) == _tag_start + 1) _tag_is_comment = true;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case ord("/"): //Close tag indicator
|
||||||
|
if (buffer_tell(_buffer) == _tag_start + 1)
|
||||||
|
{
|
||||||
|
_tag_terminating = true;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if ((_tag == undefined) && (buffer_tell(_buffer) > _tag_start))
|
||||||
|
{
|
||||||
|
_tag_terminating = true;
|
||||||
|
|
||||||
|
buffer_poke(_buffer, buffer_tell(_buffer)-1, buffer_u8, 0x0);
|
||||||
|
buffer_seek(_buffer, buffer_seek_start, _tag_start);
|
||||||
|
_tag = buffer_read(_buffer, buffer_string);
|
||||||
|
buffer_poke(_buffer, buffer_tell(_buffer)-1, buffer_u8, _value);
|
||||||
|
|
||||||
|
_stack_top = {
|
||||||
|
type: _tag,
|
||||||
|
};
|
||||||
|
|
||||||
|
ds_list_insert(_stack, 0, _stack_top);
|
||||||
|
|
||||||
|
if (!variable_struct_exists(_stack_parent, "children")) _stack_parent.children = [];
|
||||||
|
array_push(_stack_parent.children, _stack_top);
|
||||||
|
|
||||||
|
_in_key = true;
|
||||||
|
_key_start = -1;
|
||||||
|
_tag_reading_attributes = true;
|
||||||
|
_skip_whitespace = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
case ord(" "):
|
||||||
|
if (!_tag_is_prolog)
|
||||||
|
{
|
||||||
|
buffer_poke(_buffer, buffer_tell(_buffer)-1, buffer_u8, 0x0);
|
||||||
|
buffer_seek(_buffer, buffer_seek_start, _tag_start);
|
||||||
|
_tag = buffer_read(_buffer, buffer_string);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!_tag_is_comment && !_tag_terminating)
|
||||||
|
{
|
||||||
|
_stack_top = {
|
||||||
|
type: (_tag_is_prolog? "prolog" : _tag),
|
||||||
|
};
|
||||||
|
|
||||||
|
ds_list_insert(_stack, 0, _stack_top);
|
||||||
|
|
||||||
|
if (_tag_is_prolog)
|
||||||
|
{
|
||||||
|
_stack_parent.prolog = _stack_top;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (!variable_struct_exists(_stack_parent, "children")) _stack_parent.children = [];
|
||||||
|
array_push(_stack_parent.children, _stack_top);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
_in_key = true;
|
||||||
|
_key_start = -1;
|
||||||
|
_tag_reading_attributes = true;
|
||||||
|
_skip_whitespace = true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!_in_string && (_value == ord(">")))
|
||||||
|
{
|
||||||
|
if (!_tag_reading_attributes && !_tag_is_comment)
|
||||||
|
{
|
||||||
|
if (!_tag_is_prolog && (_tag == undefined))
|
||||||
|
{
|
||||||
|
buffer_poke(_buffer, buffer_tell(_buffer)-1, buffer_u8, 0x0);
|
||||||
|
buffer_seek(_buffer, buffer_seek_start, _tag_start);
|
||||||
|
_tag = buffer_read(_buffer, buffer_string);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!_tag_terminating)
|
||||||
|
{
|
||||||
|
_stack_top = {
|
||||||
|
type: (_tag_is_prolog? "prolog" : _tag),
|
||||||
|
};
|
||||||
|
|
||||||
|
ds_list_insert(_stack, 0, _stack_top);
|
||||||
|
|
||||||
|
if (_tag_is_prolog)
|
||||||
|
{
|
||||||
|
_stack_parent.prolog = _stack_top;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (!variable_struct_exists(_stack_parent, "children")) _stack_parent.children = [];
|
||||||
|
array_push(_stack_parent.children, _stack_top);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
var _previous_value = buffer_peek(_buffer, buffer_tell(_buffer)-2, buffer_u8);
|
||||||
|
if (_previous_value == ord("?")) //Detect ?> method to close the prolog
|
||||||
|
{
|
||||||
|
_tag_terminating = true;
|
||||||
|
}
|
||||||
|
else if (_previous_value == ord("/")) //Detect /> method to close a tag
|
||||||
|
{
|
||||||
|
_tag_terminating = true;
|
||||||
|
_tag_self_terminating = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!_tag_is_comment && (!_tag_self_terminating || _tag_reading_attributes))
|
||||||
|
{
|
||||||
|
if (_tag_terminating || _tag_is_prolog)
|
||||||
|
{
|
||||||
|
ds_list_delete(_stack, 0);
|
||||||
|
_stack_top = _stack[| 0];
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
_in_text = true;
|
||||||
|
_text_has_ampersand = false;
|
||||||
|
_text_start = buffer_tell(_buffer);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!_tag_is_comment || (_tag_is_comment && _previous_value == ord("-")))
|
||||||
|
{
|
||||||
|
_tag = undefined;
|
||||||
|
_in_tag = false;
|
||||||
|
_in_key = false;
|
||||||
|
_in_value = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if ((_value == 10) || (_value == 13)) //Newline
|
||||||
|
{
|
||||||
|
_in_text = false;
|
||||||
|
_skip_whitespace = true;
|
||||||
|
}
|
||||||
|
else if (_value == ord("<")) //Open a tag
|
||||||
|
{
|
||||||
|
if (_in_text)
|
||||||
|
{
|
||||||
|
_in_text = false;
|
||||||
|
buffer_poke(_buffer, buffer_tell(_buffer)-1, buffer_u8, 0x0);
|
||||||
|
buffer_seek(_buffer, buffer_seek_start, _text_start);
|
||||||
|
_text = buffer_read(_buffer, buffer_string);
|
||||||
|
|
||||||
|
_stack_top.text = _text;
|
||||||
|
}
|
||||||
|
|
||||||
|
_stack_parent = _stack_top;
|
||||||
|
_in_tag = true;
|
||||||
|
_tag_terminating = false;
|
||||||
|
_tag_self_terminating = false;
|
||||||
|
_tag_is_prolog = false;
|
||||||
|
_tag_is_comment = false;
|
||||||
|
_tag_terminating = false;
|
||||||
|
_tag_reading_attributes = false;
|
||||||
|
_tag_has_attributes = false;
|
||||||
|
_tag_start = buffer_tell(_buffer);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
ds_list_destroy(_stack);
|
||||||
|
|
||||||
|
buffer_seek(_buffer, buffer_seek_start, _oldOffset);
|
||||||
|
|
||||||
|
return _root;
|
||||||
|
}
|
13
scripts/SnapBufferReadXML/SnapBufferReadXML.yy
Normal file
13
scripts/SnapBufferReadXML/SnapBufferReadXML.yy
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
{
|
||||||
|
"$GMScript":"",
|
||||||
|
"%Name":"SnapBufferReadXML",
|
||||||
|
"isCompatibility":false,
|
||||||
|
"isDnD":false,
|
||||||
|
"name":"SnapBufferReadXML",
|
||||||
|
"parent":{
|
||||||
|
"name":"XML",
|
||||||
|
"path":"folders/_extensions/SNAP/XML.yy",
|
||||||
|
},
|
||||||
|
"resourceType":"GMScript",
|
||||||
|
"resourceVersion":"2.0",
|
||||||
|
}
|
117
scripts/SnapBufferWriteXML/SnapBufferWriteXML.gml
Normal file
117
scripts/SnapBufferWriteXML/SnapBufferWriteXML.gml
Normal file
|
@ -0,0 +1,117 @@
|
||||||
|
// Feather disable all
|
||||||
|
/// @param buffer Buffer to write the data to
|
||||||
|
/// @param struct The data to be encoded
|
||||||
|
///
|
||||||
|
/// @jujuadams 2022-10-30
|
||||||
|
|
||||||
|
function SnapBufferWriteXML(_buffer, _struct)
|
||||||
|
{
|
||||||
|
var _prologStruct = _struct[$ "prolog"];
|
||||||
|
if (is_struct(_prologStruct))
|
||||||
|
{
|
||||||
|
var _attributeStruct = _prologStruct[$ "attributes"];
|
||||||
|
if (is_struct(_attributeStruct))
|
||||||
|
{
|
||||||
|
var _names = variable_struct_get_names(_attributeStruct);
|
||||||
|
|
||||||
|
var _count = array_length(_names);
|
||||||
|
if (_count > 0)
|
||||||
|
{
|
||||||
|
buffer_write(_buffer, buffer_text, "<?xml");
|
||||||
|
|
||||||
|
var _i = 0;
|
||||||
|
repeat(_count)
|
||||||
|
{
|
||||||
|
var _key = _names[_i];
|
||||||
|
var _value = _attributeStruct[$ _key];
|
||||||
|
|
||||||
|
buffer_write(_buffer, buffer_text, " ");
|
||||||
|
buffer_write(_buffer, buffer_text, _key);
|
||||||
|
buffer_write(_buffer, buffer_text, "=\"");
|
||||||
|
buffer_write(_buffer, buffer_text, string(_value));
|
||||||
|
buffer_write(_buffer, buffer_text, "\"");
|
||||||
|
|
||||||
|
++_i;
|
||||||
|
}
|
||||||
|
|
||||||
|
buffer_write(_buffer, buffer_text, "?>\n");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
var _children = _struct[$ "children"];
|
||||||
|
if (is_array(_children))
|
||||||
|
{
|
||||||
|
var _i = 0;
|
||||||
|
repeat(array_length(_children))
|
||||||
|
{
|
||||||
|
__SnapToXMLBufferInner(_buffer, _children[_i], "");
|
||||||
|
++_i;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function __SnapToXMLBufferInner(_buffer, _struct, _indent)
|
||||||
|
{
|
||||||
|
buffer_write(_buffer, buffer_text, _indent);
|
||||||
|
buffer_write(_buffer, buffer_text, "<");
|
||||||
|
buffer_write(_buffer, buffer_text, _struct.type);
|
||||||
|
|
||||||
|
var _attributeStruct = _struct[$ "attributes"];
|
||||||
|
if (is_struct(_attributeStruct))
|
||||||
|
{
|
||||||
|
var _names = variable_struct_get_names(_attributeStruct);
|
||||||
|
|
||||||
|
var _i = 0;
|
||||||
|
repeat(array_length(_names))
|
||||||
|
{
|
||||||
|
var _key = _names[_i];
|
||||||
|
var _value = _attributeStruct[$ _key];
|
||||||
|
|
||||||
|
buffer_write(_buffer, buffer_text, " ");
|
||||||
|
buffer_write(_buffer, buffer_text, _key);
|
||||||
|
buffer_write(_buffer, buffer_text, "=\"");
|
||||||
|
buffer_write(_buffer, buffer_text, string(_value));
|
||||||
|
buffer_write(_buffer, buffer_text, "\"");
|
||||||
|
|
||||||
|
++_i;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
buffer_write(_buffer, buffer_text, ">");
|
||||||
|
|
||||||
|
var _content = _struct[$ "text"];
|
||||||
|
if (_content != undefined)
|
||||||
|
{
|
||||||
|
buffer_write(_buffer, buffer_text, string(_content));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
var _children = _struct[$ "children"];
|
||||||
|
if (is_array(_children))
|
||||||
|
{
|
||||||
|
var _count = array_length(_children);
|
||||||
|
if (_count > 0)
|
||||||
|
{
|
||||||
|
var _preIndent = _indent;
|
||||||
|
_indent += chr(0x09);
|
||||||
|
|
||||||
|
var _i = 0;
|
||||||
|
repeat(_count)
|
||||||
|
{
|
||||||
|
buffer_write(_buffer, buffer_u8, 13);
|
||||||
|
__SnapToXMLBufferInner(_buffer, _children[_i], _indent);
|
||||||
|
++_i;
|
||||||
|
}
|
||||||
|
|
||||||
|
_indent = _preIndent;
|
||||||
|
buffer_write(_buffer, buffer_u8, 13);
|
||||||
|
buffer_write(_buffer, buffer_text, _indent);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
buffer_write(_buffer, buffer_text, "</");
|
||||||
|
buffer_write(_buffer, buffer_text, _struct.type);
|
||||||
|
buffer_write(_buffer, buffer_text, ">");
|
||||||
|
}
|
13
scripts/SnapBufferWriteXML/SnapBufferWriteXML.yy
Normal file
13
scripts/SnapBufferWriteXML/SnapBufferWriteXML.yy
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
{
|
||||||
|
"$GMScript":"",
|
||||||
|
"%Name":"SnapBufferWriteXML",
|
||||||
|
"isCompatibility":false,
|
||||||
|
"isDnD":false,
|
||||||
|
"name":"SnapBufferWriteXML",
|
||||||
|
"parent":{
|
||||||
|
"name":"XML",
|
||||||
|
"path":"folders/_extensions/SNAP/XML.yy",
|
||||||
|
},
|
||||||
|
"resourceType":"GMScript",
|
||||||
|
"resourceVersion":"2.0",
|
||||||
|
}
|
15
scripts/SnapFromXML/SnapFromXML.gml
Normal file
15
scripts/SnapFromXML/SnapFromXML.gml
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
// Feather disable all
|
||||||
|
/// Decodes an XML string and outputs a struct
|
||||||
|
///
|
||||||
|
/// @param string String to decode
|
||||||
|
///
|
||||||
|
/// @jujuadams 2022-10-30
|
||||||
|
|
||||||
|
function SnapFromXML(_string)
|
||||||
|
{
|
||||||
|
var _buffer = buffer_create(string_byte_length(_string), buffer_fixed, 1);
|
||||||
|
buffer_write(_buffer, buffer_text, _string);
|
||||||
|
var _data = SnapBufferReadXML(_buffer, 0, buffer_get_size(_buffer));
|
||||||
|
buffer_delete(_buffer);
|
||||||
|
return _data;
|
||||||
|
}
|
13
scripts/SnapFromXML/SnapFromXML.yy
Normal file
13
scripts/SnapFromXML/SnapFromXML.yy
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
{
|
||||||
|
"$GMScript":"",
|
||||||
|
"%Name":"SnapFromXML",
|
||||||
|
"isCompatibility":false,
|
||||||
|
"isDnD":false,
|
||||||
|
"name":"SnapFromXML",
|
||||||
|
"parent":{
|
||||||
|
"name":"XML",
|
||||||
|
"path":"folders/_extensions/SNAP/XML.yy",
|
||||||
|
},
|
||||||
|
"resourceType":"GMScript",
|
||||||
|
"resourceVersion":"2.0",
|
||||||
|
}
|
16
scripts/SnapToXML/SnapToXML.gml
Normal file
16
scripts/SnapToXML/SnapToXML.gml
Normal file
|
@ -0,0 +1,16 @@
|
||||||
|
// Feather disable all
|
||||||
|
/// @return XML string that encodes the provided struct
|
||||||
|
///
|
||||||
|
/// @param struct The data to encode
|
||||||
|
///
|
||||||
|
/// @jujuadams 2022-10-30
|
||||||
|
|
||||||
|
function SnapToXML(_struct)
|
||||||
|
{
|
||||||
|
var _buffer = buffer_create(1024, buffer_grow, 1);
|
||||||
|
SnapBufferWriteXML(_buffer, _struct);
|
||||||
|
buffer_seek(_buffer, buffer_seek_start, 0);
|
||||||
|
var _string = buffer_read(_buffer, buffer_string);
|
||||||
|
buffer_delete(_buffer);
|
||||||
|
return _string;
|
||||||
|
}
|
13
scripts/SnapToXML/SnapToXML.yy
Normal file
13
scripts/SnapToXML/SnapToXML.yy
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
{
|
||||||
|
"$GMScript":"",
|
||||||
|
"%Name":"SnapToXML",
|
||||||
|
"isCompatibility":false,
|
||||||
|
"isDnD":false,
|
||||||
|
"name":"SnapToXML",
|
||||||
|
"parent":{
|
||||||
|
"name":"XML",
|
||||||
|
"path":"folders/_extensions/SNAP/XML.yy",
|
||||||
|
},
|
||||||
|
"resourceType":"GMScript",
|
||||||
|
"resourceVersion":"2.0",
|
||||||
|
}
|
|
@ -27,6 +27,13 @@ function SurfaceAtlasFast(surface, _x = 0, _y = 0, rot = 0, sx = 1, sy = 1, blen
|
||||||
|
|
||||||
return self;
|
return self;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static getSurface = function() {
|
||||||
|
INLINE
|
||||||
|
|
||||||
|
return surface;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function SurfaceAtlas(surface, _x = 0, _y = 0, rot = 0, sx = 1, sy = 1, blend = c_white, alpha = 1, setDim = true) : Atlas() constructor {
|
function SurfaceAtlas(surface, _x = 0, _y = 0, rot = 0, sx = 1, sy = 1, blend = c_white, alpha = 1, setDim = true) : Atlas() constructor {
|
||||||
|
|
|
@ -36,10 +36,10 @@
|
||||||
globalvar VERSION, SAVE_VERSION, VERSION_STRING, BUILD_NUMBER, LATEST_VERSION;
|
globalvar VERSION, SAVE_VERSION, VERSION_STRING, BUILD_NUMBER, LATEST_VERSION;
|
||||||
|
|
||||||
LATEST_VERSION = 11700;
|
LATEST_VERSION = 11700;
|
||||||
VERSION = 11720;
|
VERSION = 11722;
|
||||||
SAVE_VERSION = 11690;
|
SAVE_VERSION = 11690;
|
||||||
VERSION_STRING = "1.17.2.0";
|
VERSION_STRING = "1.17.2.2";
|
||||||
BUILD_NUMBER = 11720;
|
BUILD_NUMBER = 11721;
|
||||||
|
|
||||||
globalvar HOTKEYS, HOTKEY_CONTEXT;
|
globalvar HOTKEYS, HOTKEY_CONTEXT;
|
||||||
HOTKEYS = ds_map_create();
|
HOTKEYS = ds_map_create();
|
||||||
|
|
|
@ -280,12 +280,6 @@ function drawWidget(xx, yy, ww, _m, jun, global_var = true, _hover = false, _foc
|
||||||
var widH = widExtend? editBoxH : 0;
|
var widH = widExtend? editBoxH : 0;
|
||||||
var mbRight = true;
|
var mbRight = true;
|
||||||
|
|
||||||
var un = jun.unit;
|
|
||||||
if(un.reference != noone) {
|
|
||||||
un.triggerButton.icon_index = un.mode;
|
|
||||||
un.triggerButton.tooltip.index = un.mode;
|
|
||||||
}
|
|
||||||
|
|
||||||
if(jun.expUse) { #region expression editor
|
if(jun.expUse) { #region expression editor
|
||||||
var expValid = jun.expTree != noone && jun.expTree.validate();
|
var expValid = jun.expTree != noone && jun.expTree.validate();
|
||||||
jun.express_edit.boxColor = expValid? COLORS._main_value_positive : COLORS._main_value_negative;
|
jun.express_edit.boxColor = expValid? COLORS._main_value_positive : COLORS._main_value_negative;
|
||||||
|
@ -297,6 +291,13 @@ function drawWidget(xx, yy, ww, _m, jun, global_var = true, _hover = false, _foc
|
||||||
|
|
||||||
var wd_h = jun.express_edit.draw(editBoxX, editBoxY, editBoxW, editBoxH, jun.expression, _m);
|
var wd_h = jun.express_edit.draw(editBoxX, editBoxY, editBoxW, editBoxH, jun.expression, _m);
|
||||||
widH = wd_h - (TEXTBOX_HEIGHT * !widExtend);
|
widH = wd_h - (TEXTBOX_HEIGHT * !widExtend);
|
||||||
|
|
||||||
|
var un = jun.unit;
|
||||||
|
if(un.reference != noone) {
|
||||||
|
un.triggerButton.icon_index = un.mode;
|
||||||
|
un.triggerButton.tooltip.index = un.mode;
|
||||||
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
} else if(wid && jun.display_type != VALUE_DISPLAY.none) { #region edit widget
|
} else if(wid && jun.display_type != VALUE_DISPLAY.none) { #region edit widget
|
||||||
|
|
|
@ -5,8 +5,8 @@
|
||||||
"isDnD":false,
|
"isDnD":false,
|
||||||
"name":"node_image_animated",
|
"name":"node_image_animated",
|
||||||
"parent":{
|
"parent":{
|
||||||
"name":"io",
|
"name":"image",
|
||||||
"path":"folders/nodes/data/io.yy",
|
"path":"folders/nodes/data/io/image.yy",
|
||||||
},
|
},
|
||||||
"resourceType":"GMScript",
|
"resourceType":"GMScript",
|
||||||
"resourceVersion":"2.0",
|
"resourceVersion":"2.0",
|
||||||
|
|
|
@ -5,8 +5,8 @@
|
||||||
"isDnD":false,
|
"isDnD":false,
|
||||||
"name":"node_image_gif",
|
"name":"node_image_gif",
|
||||||
"parent":{
|
"parent":{
|
||||||
"name":"io",
|
"name":"image",
|
||||||
"path":"folders/nodes/data/io.yy",
|
"path":"folders/nodes/data/io/image.yy",
|
||||||
},
|
},
|
||||||
"resourceType":"GMScript",
|
"resourceType":"GMScript",
|
||||||
"resourceVersion":"2.0",
|
"resourceVersion":"2.0",
|
||||||
|
|
|
@ -5,8 +5,8 @@
|
||||||
"isDnD":false,
|
"isDnD":false,
|
||||||
"name":"node_image_sequence",
|
"name":"node_image_sequence",
|
||||||
"parent":{
|
"parent":{
|
||||||
"name":"io",
|
"name":"image",
|
||||||
"path":"folders/nodes/data/io.yy",
|
"path":"folders/nodes/data/io/image.yy",
|
||||||
},
|
},
|
||||||
"resourceType":"GMScript",
|
"resourceType":"GMScript",
|
||||||
"resourceVersion":"2.0",
|
"resourceVersion":"2.0",
|
||||||
|
|
|
@ -5,8 +5,8 @@
|
||||||
"isDnD":false,
|
"isDnD":false,
|
||||||
"name":"node_image_sheet",
|
"name":"node_image_sheet",
|
||||||
"parent":{
|
"parent":{
|
||||||
"name":"io",
|
"name":"image",
|
||||||
"path":"folders/nodes/data/io.yy",
|
"path":"folders/nodes/data/io/image.yy",
|
||||||
},
|
},
|
||||||
"resourceType":"GMScript",
|
"resourceType":"GMScript",
|
||||||
"resourceVersion":"2.0",
|
"resourceVersion":"2.0",
|
||||||
|
|
|
@ -17,11 +17,13 @@ enum MATH_OPERATOR {
|
||||||
round,
|
round,
|
||||||
|
|
||||||
lerp,
|
lerp,
|
||||||
abs
|
abs,
|
||||||
|
|
||||||
|
clamp,
|
||||||
}
|
}
|
||||||
|
|
||||||
#region create
|
#region create
|
||||||
global.node_math_keys = [ "add", "subtract", "multiply", "divide", "power", "root", "modulo", "round", "ceiling", "floor", "sin", "cos", "tan", "lerp", "abs" ];
|
global.node_math_keys = [ "add", "subtract", "multiply", "divide", "power", "root", "modulo", "round", "ceiling", "floor", "sin", "cos", "tan", "lerp", "abs", "clamp" ];
|
||||||
|
|
||||||
function Node_create_Math(_x, _y, _group = noone, _param = {}) {
|
function Node_create_Math(_x, _y, _group = noone, _param = {}) {
|
||||||
var query = struct_try_get(_param, "query", "");
|
var query = struct_try_get(_param, "query", "");
|
||||||
|
@ -47,6 +49,8 @@ enum MATH_OPERATOR {
|
||||||
|
|
||||||
case "lerp" : node.inputs[| 0].setValue(MATH_OPERATOR.lerp); break;
|
case "lerp" : node.inputs[| 0].setValue(MATH_OPERATOR.lerp); break;
|
||||||
case "abs" : node.inputs[| 0].setValue(MATH_OPERATOR.abs); break;
|
case "abs" : node.inputs[| 0].setValue(MATH_OPERATOR.abs); break;
|
||||||
|
|
||||||
|
case "clamp" : node.inputs[| 0].setValue(MATH_OPERATOR.clamp); break;
|
||||||
} #endregion
|
} #endregion
|
||||||
|
|
||||||
return node;
|
return node;
|
||||||
|
@ -61,7 +65,7 @@ function Node_Math(_x, _y, _group = noone) : Node(_x, _y, _group) constructor {
|
||||||
inputs[| 0] = nodeValue("Type", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0)
|
inputs[| 0] = nodeValue("Type", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0)
|
||||||
.setDisplay(VALUE_DISPLAY.enum_scroll, [
|
.setDisplay(VALUE_DISPLAY.enum_scroll, [
|
||||||
/* 0 - 9*/ "Add", "Subtract", "Multiply", "Divide", "Power", "Root", "Sin", "Cos", "Tan", "Modulo",
|
/* 0 - 9*/ "Add", "Subtract", "Multiply", "Divide", "Power", "Root", "Sin", "Cos", "Tan", "Modulo",
|
||||||
/*10 - 20*/ "Floor", "Ceil", "Round", "Lerp", "Abs" ])
|
/*10 - 20*/ "Floor", "Ceil", "Round", "Lerp", "Abs", "Clamp" ])
|
||||||
.rejectArray();
|
.rejectArray();
|
||||||
|
|
||||||
inputs[| 1] = nodeValue("a", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0)
|
inputs[| 1] = nodeValue("a", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0)
|
||||||
|
@ -106,6 +110,8 @@ function Node_Math(_x, _y, _group = noone) : Node(_x, _y, _group) constructor {
|
||||||
|
|
||||||
case MATH_OPERATOR.lerp : return lerp(a, b, c);
|
case MATH_OPERATOR.lerp : return lerp(a, b, c);
|
||||||
case MATH_OPERATOR.abs : return abs(a);
|
case MATH_OPERATOR.abs : return abs(a);
|
||||||
|
|
||||||
|
case MATH_OPERATOR.clamp : return clamp(a, b, c);
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
} #endregion
|
} #endregion
|
||||||
|
@ -141,7 +147,6 @@ function Node_Math(_x, _y, _group = noone) : Node(_x, _y, _group) constructor {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
inputs[| 2].name = "b";
|
|
||||||
inputs[| 5].setVisible(false);
|
inputs[| 5].setVisible(false);
|
||||||
|
|
||||||
switch(mode) {
|
switch(mode) {
|
||||||
|
@ -152,39 +157,56 @@ function Node_Math(_x, _y, _group = noone) : Node(_x, _y, _group) constructor {
|
||||||
case MATH_OPERATOR.power :
|
case MATH_OPERATOR.power :
|
||||||
case MATH_OPERATOR.root :
|
case MATH_OPERATOR.root :
|
||||||
case MATH_OPERATOR.modulo :
|
case MATH_OPERATOR.modulo :
|
||||||
inputs[| 2].setVisible(true);
|
inputs[| 2].name = "b";
|
||||||
|
|
||||||
|
inputs[| 2].setVisible(true, true);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case MATH_OPERATOR.sin :
|
case MATH_OPERATOR.sin :
|
||||||
case MATH_OPERATOR.cos :
|
case MATH_OPERATOR.cos :
|
||||||
case MATH_OPERATOR.tan :
|
case MATH_OPERATOR.tan :
|
||||||
inputs[| 2].setVisible(true);
|
|
||||||
inputs[| 2].name = "Amplitude";
|
inputs[| 2].name = "Amplitude";
|
||||||
|
|
||||||
|
inputs[| 2].setVisible(true, true);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case MATH_OPERATOR.floor :
|
case MATH_OPERATOR.floor :
|
||||||
case MATH_OPERATOR.ceiling :
|
case MATH_OPERATOR.ceiling :
|
||||||
case MATH_OPERATOR.round :
|
case MATH_OPERATOR.round :
|
||||||
case MATH_OPERATOR.abs :
|
case MATH_OPERATOR.abs :
|
||||||
inputs[| 2].setVisible(false);
|
inputs[| 2].setVisible(false);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case MATH_OPERATOR.lerp :
|
case MATH_OPERATOR.lerp :
|
||||||
inputs[| 2].setVisible(true);
|
inputs[| 2].name = "To";
|
||||||
inputs[| 5].setVisible(true);
|
inputs[| 5].name = "Amount";
|
||||||
|
|
||||||
|
inputs[| 2].setVisible(true, true);
|
||||||
|
inputs[| 5].setVisible(true, true);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case MATH_OPERATOR.clamp :
|
||||||
|
inputs[| 2].name = "Min";
|
||||||
|
inputs[| 5].name = "Max";
|
||||||
|
|
||||||
|
inputs[| 2].setVisible(true, true);
|
||||||
|
inputs[| 5].setVisible(true, true);
|
||||||
break;
|
break;
|
||||||
default: return;
|
default: return;
|
||||||
}
|
}
|
||||||
} #endregion
|
} #endregion
|
||||||
|
|
||||||
function evalArray(a, b, c = 0) { #region
|
function evalArray(a, b, c = 0) { #region
|
||||||
var as = is_array(a);
|
var _as = is_array(a);
|
||||||
var bs = is_array(b);
|
var _bs = is_array(b);
|
||||||
var cs = is_array(c);
|
var _cs = is_array(c);
|
||||||
|
|
||||||
if(!as && !bs && !cs)
|
if(!_as && !_bs && !_cs)
|
||||||
return _eval(a, b, c);
|
return _eval(a, b, c);
|
||||||
|
|
||||||
if(!as) a = [ a ];
|
if(!_as) a = [ a ];
|
||||||
if(!bs) b = [ b ];
|
if(!_bs) b = [ b ];
|
||||||
if(!cs) c = [ c ];
|
if(!_cs) c = [ c ];
|
||||||
|
|
||||||
var al = array_length(a);
|
var al = array_length(a);
|
||||||
var bl = array_length(b);
|
var bl = array_length(b);
|
||||||
|
@ -205,9 +227,10 @@ function Node_Math(_x, _y, _group = noone) : Node(_x, _y, _group) constructor {
|
||||||
|
|
||||||
static update = function(frame = CURRENT_FRAME) { #region
|
static update = function(frame = CURRENT_FRAME) { #region
|
||||||
use_mod = getInputData(0);
|
use_mod = getInputData(0);
|
||||||
|
use_deg = getInputData(3);
|
||||||
|
|
||||||
var a = getInputData(1);
|
var a = getInputData(1);
|
||||||
var b = getInputData(2);
|
var b = getInputData(2);
|
||||||
use_deg = getInputData(3);
|
|
||||||
var c = getInputData(5);
|
var c = getInputData(5);
|
||||||
|
|
||||||
var val = evalArray(a, b, c);
|
var val = evalArray(a, b, c);
|
||||||
|
@ -236,11 +259,13 @@ function Node_Math(_x, _y, _group = noone) : Node(_x, _y, _group) constructor {
|
||||||
|
|
||||||
case MATH_OPERATOR.lerp : str = "lerp"; break;
|
case MATH_OPERATOR.lerp : str = "lerp"; break;
|
||||||
case MATH_OPERATOR.abs : str = "abs"; break;
|
case MATH_OPERATOR.abs : str = "abs"; break;
|
||||||
|
|
||||||
|
case MATH_OPERATOR.clamp : str = "clamp"; break;
|
||||||
default: return;
|
default: return;
|
||||||
}
|
}
|
||||||
|
|
||||||
var bbox = drawGetBbox(xx, yy, _s);
|
var bbox = drawGetBbox(xx, yy, _s);
|
||||||
var ss = string_scale(str, bbox.w, bbox.h);
|
var ss = string_scale(str, bbox.w, bbox.h);
|
||||||
draw_text_transformed(bbox.xc, bbox.yc, str, ss, ss, 0);
|
draw_text_transformed(bbox.xc, bbox.yc, str, ss * 0.8, ss * 0.8, 0);
|
||||||
} #endregion
|
} #endregion
|
||||||
}
|
}
|
|
@ -217,48 +217,57 @@ function Node_Processor(_x, _y, _group = noone) : Node(_x, _y, _group) construct
|
||||||
} #endregion
|
} #endregion
|
||||||
|
|
||||||
static processBatchOutput = function() { #region
|
static processBatchOutput = function() { #region
|
||||||
for(var i = 0; i < ds_list_size(outputs); i++) {
|
var _is = ds_list_size(inputs);
|
||||||
if(outputs[| i].type != VALUE_TYPE.surface) continue;
|
var _os = ds_list_size(outputs);
|
||||||
var _res = outputs[| i].getValue();
|
|
||||||
surface_array_free(_res);
|
var _outVal = array_create(_os);
|
||||||
outputs[| i].setValue(noone);
|
for(var i = 0; i < _os; i++)
|
||||||
}
|
_outVal[i] = outputs[| i].getValue();
|
||||||
|
|
||||||
if(process_amount == 1) {
|
if(process_amount == 1) {
|
||||||
var data = processData(noone, inputs_data, 0, 0);
|
current_data = inputs_data;
|
||||||
for(var i = 0; i < ds_list_size(outputs); i++) {
|
var data = processData(_outVal, inputs_data, 0, 0);
|
||||||
|
|
||||||
|
if(_os == 1) {
|
||||||
|
outputs[| 0].setValue(data);
|
||||||
|
|
||||||
|
} else {
|
||||||
|
for(var i = 0; i < _os; i++) {
|
||||||
var _outp = array_safe_get_fast(data, i, undefined);
|
var _outp = array_safe_get_fast(data, i, undefined);
|
||||||
if(_outp == undefined) continue;
|
if(_outp == undefined) continue;
|
||||||
outputs[| i].setValue(_outp);
|
outputs[| i].setValue(_outp);
|
||||||
}
|
}
|
||||||
} else {
|
}
|
||||||
var _outputs = array_create(ds_list_size(outputs));
|
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
var _inputs = array_create(_is);
|
||||||
|
var _outputs = array_create(_os);
|
||||||
|
|
||||||
for( var l = 0; l < process_amount; l++ ) {
|
for( var l = 0; l < process_amount; l++ ) {
|
||||||
var _data = array_create(ds_list_size(inputs));
|
|
||||||
for(var i = 0; i < ds_list_size(inputs); i++)
|
|
||||||
_data[i] = all_inputs[i][l];
|
|
||||||
|
|
||||||
var data = processData(0, _data, 0, l);
|
for(var i = 0; i < _is; i++)
|
||||||
for(var i = 0; i < ds_list_size(outputs); i++) {
|
_inputs[i] = all_inputs[i][l];
|
||||||
var _outp = array_safe_get_fast(data, i, undefined);
|
|
||||||
_outputs[i][l] = _outp;
|
if(l == 0 || l == preview_index)
|
||||||
}
|
current_data = _inputs;
|
||||||
|
|
||||||
|
var data = processData(_outVal, _inputs, 0, l);
|
||||||
|
|
||||||
|
if(_os == 1) _outputs[0][l] = data;
|
||||||
|
else for(var i = 0; i < _os; i++) _outputs[i][l] = data[i];
|
||||||
}
|
}
|
||||||
|
|
||||||
for( var i = 0, n = ds_list_size(outputs); i < n; i++ )
|
for( var i = 0, n = _os; i < n; i++ )
|
||||||
outputs[| i].setValue(_outputs[i]);
|
outputs[| i].setValue(_outputs[i]);
|
||||||
}
|
|
||||||
} #endregion
|
} #endregion
|
||||||
|
|
||||||
static processOutput = function() { #region
|
static processOutput = function() { #region
|
||||||
var val;
|
|
||||||
|
|
||||||
for(var i = 0; i < ds_list_size(outputs); i++) {
|
for(var i = 0; i < ds_list_size(outputs); i++) {
|
||||||
if(outputs[| i].process_array) {
|
var val = outputs[| i].process_array? processDataArray(i) : processData(outputs[| i].getValue(), noone, i);
|
||||||
val = processDataArray(i);
|
if(val != undefined)
|
||||||
if(val == undefined) continue;
|
|
||||||
} else
|
|
||||||
val = processData(noone, noone, i);
|
|
||||||
outputs[| i].setValue(val);
|
outputs[| i].setValue(val);
|
||||||
}
|
}
|
||||||
} #endregion
|
} #endregion
|
||||||
|
@ -341,8 +350,10 @@ function Node_Processor(_x, _y, _group = noone) : Node(_x, _y, _group) construct
|
||||||
|
|
||||||
static update = function(frame = CURRENT_FRAME) { #region
|
static update = function(frame = CURRENT_FRAME) { #region
|
||||||
processData_prebatch();
|
processData_prebatch();
|
||||||
|
|
||||||
if(batch_output) processBatchOutput();
|
if(batch_output) processBatchOutput();
|
||||||
else processOutput();
|
else processOutput();
|
||||||
|
|
||||||
processData_postbatch();
|
processData_postbatch();
|
||||||
|
|
||||||
postProcess();
|
postProcess();
|
||||||
|
|
|
@ -486,7 +486,7 @@ function __initNodes() {
|
||||||
|
|
||||||
//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\
|
//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\
|
||||||
|
|
||||||
var input = ds_list_create(); #region //input
|
var input = ds_list_create(); #region //io
|
||||||
addNodeCatagory("IO", input);
|
addNodeCatagory("IO", input);
|
||||||
ds_list_add(input, "Images");
|
ds_list_add(input, "Images");
|
||||||
addNodeObject(input, "Canvas", s_node_canvas, "Node_Canvas", [1, Node_Canvas], ["draw"], "Draw on surface using brush, eraser, etc.");
|
addNodeObject(input, "Canvas", s_node_canvas, "Node_Canvas", [1, Node_Canvas], ["draw"], "Draw on surface using brush, eraser, etc.");
|
||||||
|
@ -497,6 +497,7 @@ function __initNodes() {
|
||||||
addNodeObject(input, "Image Array", s_node_image_sequence, "Node_Image_Sequence", [0, Node_create_Image_Sequence],, "Load multiple images from your computer as array.");
|
addNodeObject(input, "Image Array", s_node_image_sequence, "Node_Image_Sequence", [0, Node_create_Image_Sequence],, "Load multiple images from your computer as array.");
|
||||||
addNodeObject(input, "Animation", s_node_image_animation, "Node_Image_Animated", [0, Node_create_Image_Animated],, "Load multiple images from your computer as animation.");
|
addNodeObject(input, "Animation", s_node_image_animation, "Node_Image_Animated", [0, Node_create_Image_Animated],, "Load multiple images from your computer as animation.");
|
||||||
addNodeObject(input, "Array to Anim", s_node_image_sequence_to_anim, "Node_Sequence_Anim", [1, Node_Sequence_Anim],, "Convert array of images into animation.");
|
addNodeObject(input, "Array to Anim", s_node_image_sequence_to_anim, "Node_Sequence_Anim", [1, Node_Sequence_Anim],, "Convert array of images into animation.");
|
||||||
|
/**/addNodeObject(input, "SVG", s_node_image_sequence_to_anim, "Node_SVG", [1, Node_SVG],, "Load SVG file.");
|
||||||
if(!DEMO) addNodeObject(input, "Export", s_node_export, "Node_Export", [0, Node_create_Export],, "Export image, image array to file, image sequence, animation.");
|
if(!DEMO) addNodeObject(input, "Export", s_node_export, "Node_Export", [0, Node_create_Export],, "Export image, image array to file, image sequence, animation.");
|
||||||
|
|
||||||
ds_list_add(input, "Files");
|
ds_list_add(input, "Files");
|
||||||
|
@ -510,6 +511,8 @@ function __initNodes() {
|
||||||
addNodeObject(input, "ASE Layer", s_node_ase_layer, "Node_ASE_layer", [1, Node_ASE_layer],, "Load Aseprite project file").setVersion(1100);
|
addNodeObject(input, "ASE Layer", s_node_ase_layer, "Node_ASE_layer", [1, Node_ASE_layer],, "Load Aseprite project file").setVersion(1100);
|
||||||
addNodeObject(input, "WAV File In", s_node_wav_file_read, "Node_WAV_File_Read", [0, Node_create_WAV_File_Read],, "Load wav audio file.").setVersion(1144);
|
addNodeObject(input, "WAV File In", s_node_wav_file_read, "Node_WAV_File_Read", [0, Node_create_WAV_File_Read],, "Load wav audio file.").setVersion(1144);
|
||||||
addNodeObject(input, "WAV File Out", s_node_wav_file_write, "Node_WAV_File_Write", [1, Node_WAV_File_Write],, "Save wav audio file.").setVersion(1145);
|
addNodeObject(input, "WAV File Out", s_node_wav_file_write, "Node_WAV_File_Write", [1, Node_WAV_File_Write],, "Save wav audio file.").setVersion(1145);
|
||||||
|
addNodeObject(input, "XML File In", s_node_xml_file_read, "Node_XML_File_Read", [0, Node_create_XML_File_Read],, "Load xml file.").setVersion(11720);
|
||||||
|
addNodeObject(input, "XML File Out", s_node_xml_file_write, "Node_XML_File_Write", [1, Node_XML_File_Write],, "Write struct to xml file.").setVersion(11720);
|
||||||
addNodeObject(input, "Byte File In", s_node_byte_file_read, "Node_Byte_File_Read", [1, Node_Byte_File_Read],, "Load any file to buffer.").setVersion(11670);
|
addNodeObject(input, "Byte File In", s_node_byte_file_read, "Node_Byte_File_Read", [1, Node_Byte_File_Read],, "Load any file to buffer.").setVersion(11670);
|
||||||
addNodeObject(input, "Byte File Out", s_node_byte_file_write, "Node_Byte_File_Write", [1, Node_Byte_File_Write],, "Save buffer content to a file.").setVersion(11670);
|
addNodeObject(input, "Byte File Out", s_node_byte_file_write, "Node_Byte_File_Write", [1, Node_Byte_File_Write],, "Save buffer content to a file.").setVersion(11670);
|
||||||
addNodeObject(input, "Directory Search", s_node_directory, "Node_Directory_Search", [0, Node_create_Directory_Search],, "Search for files in directory.").setVersion(11710);
|
addNodeObject(input, "Directory Search", s_node_directory, "Node_Directory_Search", [0, Node_create_Directory_Search],, "Search for files in directory.").setVersion(11710);
|
||||||
|
|
|
@ -5,8 +5,8 @@
|
||||||
"isDnD":false,
|
"isDnD":false,
|
||||||
"name":"node_sequence_anim",
|
"name":"node_sequence_anim",
|
||||||
"parent":{
|
"parent":{
|
||||||
"name":"io",
|
"name":"image",
|
||||||
"path":"folders/nodes/data/io.yy",
|
"path":"folders/nodes/data/io/image.yy",
|
||||||
},
|
},
|
||||||
"resourceType":"GMScript",
|
"resourceType":"GMScript",
|
||||||
"resourceVersion":"2.0",
|
"resourceVersion":"2.0",
|
||||||
|
|
108
scripts/node_svg/node_svg.gml
Normal file
108
scripts/node_svg/node_svg.gml
Normal file
|
@ -0,0 +1,108 @@
|
||||||
|
function Node_create_SVG_path(_x, _y, path) { #region
|
||||||
|
if(!file_exists_empty(path)) return noone;
|
||||||
|
|
||||||
|
var node = new Node_SVG(_x, _y, PANEL_GRAPH.getCurrentContext());
|
||||||
|
node.inputs[| 0].setValue(path);
|
||||||
|
node.doUpdate();
|
||||||
|
return node;
|
||||||
|
} #endregion
|
||||||
|
|
||||||
|
function Node_SVG(_x, _y, _group = noone) : Node(_x, _y, _group) constructor {
|
||||||
|
name = "SVG";
|
||||||
|
color = COLORS.node_blend_input;
|
||||||
|
|
||||||
|
inputs[| 0] = nodeValue("Path", self, JUNCTION_CONNECT.input, VALUE_TYPE.path, "")
|
||||||
|
.setDisplay(VALUE_DISPLAY.path_load, { filter: "Scalable Vector Graphics|*.svg" });
|
||||||
|
|
||||||
|
inputs[| 1] = nodeValue("Scale", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 1);
|
||||||
|
|
||||||
|
outputs[| 0] = nodeValue("Surface out", self, JUNCTION_CONNECT.output, VALUE_TYPE.surface, noone);
|
||||||
|
|
||||||
|
outputs[| 1] = nodeValue("SVG Struct", self, JUNCTION_CONNECT.output, VALUE_TYPE.struct, {});
|
||||||
|
|
||||||
|
outputs[| 2] = nodeValue("Path", self, JUNCTION_CONNECT.output, VALUE_TYPE.path, "")
|
||||||
|
.setVisible(true, true);
|
||||||
|
|
||||||
|
attribute_surface_depth();
|
||||||
|
|
||||||
|
rawContent = noone;
|
||||||
|
content = {};
|
||||||
|
edit_time = 0;
|
||||||
|
curr_path = "";
|
||||||
|
|
||||||
|
attributes.check_splice = true;
|
||||||
|
attributes.file_checker = true;
|
||||||
|
array_push(attributeEditors, [ "File Watcher", function() { return attributes.file_checker; },
|
||||||
|
new checkBox(function() { attributes.file_checker = !attributes.file_checker; }) ]);
|
||||||
|
|
||||||
|
on_drop_file = function(path) { #region
|
||||||
|
inputs[| 0].setValue(path);
|
||||||
|
|
||||||
|
if(readFile(path)) {
|
||||||
|
doUpdate();
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
} #endregion
|
||||||
|
|
||||||
|
function readFile(path) { #region
|
||||||
|
curr_path = path;
|
||||||
|
if(!file_exists_empty(path))
|
||||||
|
return noone;
|
||||||
|
|
||||||
|
edit_time = file_get_modify_s(path);
|
||||||
|
var ext = string_lower(filename_ext(path));
|
||||||
|
var _name = filename_name_only(path);
|
||||||
|
|
||||||
|
if(ext != ".svg") return;
|
||||||
|
|
||||||
|
var _rawContent = file_text_read_all_lines(path);
|
||||||
|
rawContent = SnapFromXML(_rawContent);
|
||||||
|
content = svg_parse(rawContent);
|
||||||
|
|
||||||
|
return;
|
||||||
|
} #endregion
|
||||||
|
|
||||||
|
insp1UpdateTooltip = __txt("Refresh");
|
||||||
|
insp1UpdateIcon = [ THEME.refresh_icon, 1, COLORS._main_value_positive ];
|
||||||
|
|
||||||
|
static onInspector1Update = function() { #region
|
||||||
|
readFile(path_get(getInputData(0)));
|
||||||
|
triggerRender();
|
||||||
|
} #endregion
|
||||||
|
|
||||||
|
static step = function() { #region
|
||||||
|
var path = path_get(getInputData(0));
|
||||||
|
if(!file_exists_empty(path)) return;
|
||||||
|
|
||||||
|
var _modi = file_get_modify_s(path);
|
||||||
|
if(attributes.file_checker && _modi > edit_time) {
|
||||||
|
readFile(path);
|
||||||
|
triggerRender();
|
||||||
|
}
|
||||||
|
} #endregion
|
||||||
|
|
||||||
|
static update = function(frame = CURRENT_FRAME) { #region
|
||||||
|
var path = path_get(getInputData(0));
|
||||||
|
if(path != curr_path)
|
||||||
|
readFile(path);
|
||||||
|
|
||||||
|
outputs[| 1].setValue(path);
|
||||||
|
|
||||||
|
var _outsurf = outputs[| 0].getValue();
|
||||||
|
|
||||||
|
var ww = 1;
|
||||||
|
var hh = 1;
|
||||||
|
|
||||||
|
_outsurf = surface_verify(_outsurf, ww, hh, attrDepth());
|
||||||
|
print(content);
|
||||||
|
|
||||||
|
surface_set_shader(_outsurf, noone);
|
||||||
|
|
||||||
|
surface_reset_shader();
|
||||||
|
|
||||||
|
outputs[| 0].setValue(_outsurf);
|
||||||
|
outputs[| 1].setValue(rawContent);
|
||||||
|
} #endregion
|
||||||
|
}
|
13
scripts/node_svg/node_svg.yy
Normal file
13
scripts/node_svg/node_svg.yy
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
{
|
||||||
|
"$GMScript":"",
|
||||||
|
"%Name":"node_svg",
|
||||||
|
"isCompatibility":false,
|
||||||
|
"isDnD":false,
|
||||||
|
"name":"node_svg",
|
||||||
|
"parent":{
|
||||||
|
"name":"image",
|
||||||
|
"path":"folders/nodes/data/io/image.yy",
|
||||||
|
},
|
||||||
|
"resourceType":"GMScript",
|
||||||
|
"resourceVersion":"2.0",
|
||||||
|
}
|
|
@ -7,6 +7,7 @@ enum OUTPUT_SCALING {
|
||||||
|
|
||||||
function Node_Transform(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor {
|
function Node_Transform(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor {
|
||||||
name = "Transform";
|
name = "Transform";
|
||||||
|
batch_output = true;
|
||||||
|
|
||||||
inputs[| 0] = nodeValue("Surface in", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone);
|
inputs[| 0] = nodeValue("Surface in", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone);
|
||||||
|
|
||||||
|
@ -77,6 +78,10 @@ function Node_Transform(_x, _y, _group = noone) : Node_Processor(_x, _y, _group)
|
||||||
|
|
||||||
outputs[| 0] = nodeValue("Surface out", self, JUNCTION_CONNECT.output, VALUE_TYPE.surface, noone);
|
outputs[| 0] = nodeValue("Surface out", self, JUNCTION_CONNECT.output, VALUE_TYPE.surface, noone);
|
||||||
|
|
||||||
|
outputs[| 1] = nodeValue("Dimension", self, JUNCTION_CONNECT.output, VALUE_TYPE.integer, [ 1, 1 ])
|
||||||
|
.setDisplay(VALUE_DISPLAY.vector)
|
||||||
|
.setVisible(false);
|
||||||
|
|
||||||
attribute_surface_depth();
|
attribute_surface_depth();
|
||||||
attribute_interpolation();
|
attribute_interpolation();
|
||||||
|
|
||||||
|
@ -180,10 +185,7 @@ function Node_Transform(_x, _y, _group = noone) : Node_Processor(_x, _y, _group)
|
||||||
}
|
}
|
||||||
} #endregion
|
} #endregion
|
||||||
|
|
||||||
// static processData_prebatch = function() { shader_preset_interpolation(); }
|
static processData = function(_outData, _data, _output_index, _array_index) { #region
|
||||||
// static processData_postbatch = function() { shader_postset_interpolation(); }
|
|
||||||
|
|
||||||
static processData = function(_outSurf, _data, _output_index, _array_index) { #region
|
|
||||||
var ins = _data[0];
|
var ins = _data[0];
|
||||||
|
|
||||||
var out_type = _data[9];
|
var out_type = _data[9];
|
||||||
|
@ -200,13 +202,20 @@ function Node_Transform(_x, _y, _group = noone) : Node_Processor(_x, _y, _group)
|
||||||
var echo_amo = _data[13];
|
var echo_amo = _data[13];
|
||||||
var alp = _data[14];
|
var alp = _data[14];
|
||||||
|
|
||||||
|
var _outSurf = _outData[0];
|
||||||
|
var _outRes = array_create(ds_list_size(outputs));
|
||||||
|
|
||||||
var cDep = attrDepth();
|
var cDep = attrDepth();
|
||||||
|
|
||||||
var ww = surface_get_width_safe(ins);
|
var ww = surface_get_width_safe(ins);
|
||||||
var hh = surface_get_height_safe(ins);
|
var hh = surface_get_height_safe(ins);
|
||||||
var _ww = ww;
|
var _ww = ww;
|
||||||
var _hh = hh;
|
var _hh = hh;
|
||||||
if(_ww <= 1 && _hh <= 1) return _outSurf;
|
|
||||||
|
_outRes[0] = _outSurf;
|
||||||
|
_outRes[1] = [ ww, hh ];
|
||||||
|
|
||||||
|
if(_ww <= 1 && _hh <= 1) return _outRes;
|
||||||
|
|
||||||
switch(out_type) { #region output dimension
|
switch(out_type) { #region output dimension
|
||||||
case OUTPUT_SCALING.same_as_input :
|
case OUTPUT_SCALING.same_as_input :
|
||||||
|
@ -242,8 +251,12 @@ function Node_Transform(_x, _y, _group = noone) : Node_Processor(_x, _y, _group)
|
||||||
break;
|
break;
|
||||||
} #endregion
|
} #endregion
|
||||||
|
|
||||||
if(_ww <= 0 || _hh <= 0) return;
|
_outRes[1] = [ ww, hh ];
|
||||||
|
|
||||||
|
if(_ww <= 0 || _hh <= 0) return _outRes;
|
||||||
|
|
||||||
_outSurf = surface_verify(_outSurf, _ww, _hh, cDep);
|
_outSurf = surface_verify(_outSurf, _ww, _hh, cDep);
|
||||||
|
_outRes[0] = _outSurf;
|
||||||
|
|
||||||
anc[0] *= ww * sca[0];
|
anc[0] *= ww * sca[0];
|
||||||
anc[1] *= hh * sca[1];
|
anc[1] *= hh * sca[1];
|
||||||
|
@ -317,7 +330,7 @@ function Node_Transform(_x, _y, _group = noone) : Node_Processor(_x, _y, _group)
|
||||||
[ sca[0], sca[1] ],
|
[ sca[0], sca[1] ],
|
||||||
];
|
];
|
||||||
|
|
||||||
return _outSurf;
|
return _outRes;
|
||||||
} #endregion
|
} #endregion
|
||||||
|
|
||||||
overlay_dragging = 0;
|
overlay_dragging = 0;
|
||||||
|
|
|
@ -521,10 +521,6 @@ function nodeValueUnit(_nodeValue) constructor { #region
|
||||||
|
|
||||||
return _val;
|
return _val;
|
||||||
}
|
}
|
||||||
} else {
|
|
||||||
base = array_safe_get(base, 0, 1);
|
|
||||||
if(inv) base = base == 0? 0 : 1 / base;
|
|
||||||
return value * base;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return value;
|
return value;
|
||||||
|
|
114
scripts/node_xml_file_read/node_xml_file_read.gml
Normal file
114
scripts/node_xml_file_read/node_xml_file_read.gml
Normal file
|
@ -0,0 +1,114 @@
|
||||||
|
function Node_create_XML_File_Read(_x, _y, _group = noone) { #region
|
||||||
|
var path = "";
|
||||||
|
if(NODE_NEW_MANUAL) {
|
||||||
|
path = get_open_filename_pxc("xml|*.xml", "");
|
||||||
|
key_release();
|
||||||
|
if(path == "") return noone;
|
||||||
|
}
|
||||||
|
|
||||||
|
var node = new Node_XML_File_Read(_x, _y, _group);
|
||||||
|
node.inputs[| 0].setValue(path);
|
||||||
|
node.doUpdate();
|
||||||
|
|
||||||
|
return node;
|
||||||
|
} #endregion
|
||||||
|
|
||||||
|
function Node_create_XML_File_Read_path(_x, _y, path) { #region
|
||||||
|
if(!file_exists_empty(path)) return noone;
|
||||||
|
|
||||||
|
var node = new Node_XML_File_Read(_x, _y, PANEL_GRAPH.getCurrentContext());
|
||||||
|
node.inputs[| 0].setValue(path);
|
||||||
|
node.doUpdate();
|
||||||
|
|
||||||
|
return node;
|
||||||
|
} #endregion
|
||||||
|
|
||||||
|
function Node_XML_File_Read(_x, _y, _group = noone) : Node(_x, _y, _group) constructor {
|
||||||
|
name = "XML File In";
|
||||||
|
color = COLORS.node_blend_input;
|
||||||
|
|
||||||
|
w = 128;
|
||||||
|
|
||||||
|
inputs[| 0] = nodeValue("Path", self, JUNCTION_CONNECT.input, VALUE_TYPE.path, "")
|
||||||
|
.setDisplay(VALUE_DISPLAY.path_load, { filter: "XML file|*.xml" })
|
||||||
|
.rejectArray();
|
||||||
|
|
||||||
|
outputs[| 0] = nodeValue("Content", self, JUNCTION_CONNECT.output, VALUE_TYPE.struct, {});
|
||||||
|
|
||||||
|
outputs[| 1] = nodeValue("Path", self, JUNCTION_CONNECT.output, VALUE_TYPE.path, "")
|
||||||
|
.setVisible(true, true);
|
||||||
|
|
||||||
|
content = {};
|
||||||
|
path_current = "";
|
||||||
|
|
||||||
|
edit_time = 0;
|
||||||
|
attributes.file_checker = true;
|
||||||
|
array_push(attributeEditors, [ "File Watcher", function() { return attributes.file_checker; },
|
||||||
|
new checkBox(function() { attributes.file_checker = !attributes.file_checker; }) ]);
|
||||||
|
|
||||||
|
on_drop_file = function(path) { #region
|
||||||
|
if(updatePaths(path)) {
|
||||||
|
doUpdate();
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
} #endregion
|
||||||
|
|
||||||
|
function updatePaths(path = path_current) { #region
|
||||||
|
path = path_get(path);
|
||||||
|
if(path == -1) return false;
|
||||||
|
|
||||||
|
var ext = string_lower(filename_ext(path));
|
||||||
|
var _name = string_replace(filename_name(path), filename_ext(path), "");
|
||||||
|
|
||||||
|
if(ext != ".xml") return false;
|
||||||
|
|
||||||
|
outputs[| 1].setValue(path);
|
||||||
|
|
||||||
|
var _content = file_text_read_all_lines(path);
|
||||||
|
content = SnapFromXML(_content);
|
||||||
|
|
||||||
|
if(path_current == "")
|
||||||
|
path_current = path;
|
||||||
|
edit_time = max(edit_time, file_get_modify_s(path_current));
|
||||||
|
|
||||||
|
return true;
|
||||||
|
} #endregion
|
||||||
|
|
||||||
|
insp1UpdateTooltip = __txt("Refresh");
|
||||||
|
insp1UpdateIcon = [ THEME.refresh_icon, 1, COLORS._main_value_positive ];
|
||||||
|
|
||||||
|
static onInspector1Update = function() { #region
|
||||||
|
updatePaths(getInputData(0));
|
||||||
|
triggerRender();
|
||||||
|
} #endregion
|
||||||
|
|
||||||
|
static step = function() { #region
|
||||||
|
if(attributes.file_checker && file_exists_empty(path_current)) {
|
||||||
|
var _modi = file_get_modify_s(path_current);
|
||||||
|
|
||||||
|
if(_modi > edit_time) {
|
||||||
|
edit_time = _modi;
|
||||||
|
|
||||||
|
run_in(2, function() { updatePaths(); triggerRender(); });
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} #endregion
|
||||||
|
|
||||||
|
static update = function(frame = CURRENT_FRAME) { #region
|
||||||
|
var path = getInputData(0);
|
||||||
|
if(path_current != path) updatePaths(path);
|
||||||
|
|
||||||
|
outputs[| 0].setValue(content);
|
||||||
|
} #endregion
|
||||||
|
|
||||||
|
static onDrawNode = function(xx, yy, _mx, _my, _s, _hover, _focus) { #region
|
||||||
|
var bbox = drawGetBbox(xx, yy, _s);
|
||||||
|
|
||||||
|
var str = filename_name(path_current);
|
||||||
|
draw_set_text(f_sdf, fa_center, fa_center, COLORS._main_text);
|
||||||
|
var ss = string_scale(str, bbox.w, bbox.h);
|
||||||
|
draw_text_transformed(bbox.xc, bbox.yc, str, ss, ss, 0);
|
||||||
|
} #endregion
|
||||||
|
}
|
13
scripts/node_xml_file_read/node_xml_file_read.yy
Normal file
13
scripts/node_xml_file_read/node_xml_file_read.yy
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
{
|
||||||
|
"$GMScript":"",
|
||||||
|
"%Name":"node_xml_file_read",
|
||||||
|
"isCompatibility":false,
|
||||||
|
"isDnD":false,
|
||||||
|
"name":"node_xml_file_read",
|
||||||
|
"parent":{
|
||||||
|
"name":"io",
|
||||||
|
"path":"folders/nodes/data/io.yy",
|
||||||
|
},
|
||||||
|
"resourceType":"GMScript",
|
||||||
|
"resourceVersion":"2.0",
|
||||||
|
}
|
42
scripts/node_xml_file_write/node_xml_file_write.gml
Normal file
42
scripts/node_xml_file_write/node_xml_file_write.gml
Normal file
|
@ -0,0 +1,42 @@
|
||||||
|
function Node_XML_File_Write(_x, _y, _group = noone) : Node(_x, _y, _group) constructor {
|
||||||
|
name = "XML File Out";
|
||||||
|
color = COLORS.node_blend_input;
|
||||||
|
|
||||||
|
w = 128;
|
||||||
|
|
||||||
|
inputs[| 0] = nodeValue("Path", self, JUNCTION_CONNECT.input, VALUE_TYPE.path, "")
|
||||||
|
.setDisplay(VALUE_DISPLAY.path_save, { filter: "xml file|*.xml" })
|
||||||
|
.rejectArray();
|
||||||
|
|
||||||
|
inputs[| 1] = nodeValue("Struct", self, JUNCTION_CONNECT.input, VALUE_TYPE.struct, {})
|
||||||
|
.setVisible(true, true);
|
||||||
|
|
||||||
|
input_display_list = [ 0, 1 ]
|
||||||
|
|
||||||
|
static writeFile = function() {
|
||||||
|
var path = getInputData(0);
|
||||||
|
if(path == "") return;
|
||||||
|
if(filename_ext(path) != ".xml")
|
||||||
|
path += ".xml";
|
||||||
|
|
||||||
|
var cont = getInputData(1);
|
||||||
|
var str = SnapToXML(cont);
|
||||||
|
|
||||||
|
file_text_write_all(path, str);
|
||||||
|
}
|
||||||
|
|
||||||
|
static update = function(frame = CURRENT_FRAME) { writeFile(); }
|
||||||
|
static onInspector1Update = function() { writeFile(); }
|
||||||
|
|
||||||
|
static onDrawNode = function(xx, yy, _mx, _my, _s, _hover, _focus) {
|
||||||
|
var bbox = drawGetBbox(xx, yy, _s);
|
||||||
|
|
||||||
|
var str = filename_name(getInputData(0));
|
||||||
|
if(filename_ext(str) != ".xml")
|
||||||
|
str += ".xml";
|
||||||
|
|
||||||
|
draw_set_text(f_sdf, fa_center, fa_center, COLORS._main_text);
|
||||||
|
var ss = string_scale(str, bbox.w, bbox.h);
|
||||||
|
draw_text_transformed(bbox.xc, bbox.yc, str, ss, ss, 0);
|
||||||
|
}
|
||||||
|
}
|
13
scripts/node_xml_file_write/node_xml_file_write.yy
Normal file
13
scripts/node_xml_file_write/node_xml_file_write.yy
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
{
|
||||||
|
"$GMScript":"",
|
||||||
|
"%Name":"node_xml_file_write",
|
||||||
|
"isCompatibility":false,
|
||||||
|
"isDnD":false,
|
||||||
|
"name":"node_xml_file_write",
|
||||||
|
"parent":{
|
||||||
|
"name":"io",
|
||||||
|
"path":"folders/nodes/data/io.yy",
|
||||||
|
},
|
||||||
|
"resourceType":"GMScript",
|
||||||
|
"resourceVersion":"2.0",
|
||||||
|
}
|
|
@ -77,17 +77,20 @@ function surfaceBox(_onModify, def_path = "") : widget() constructor {
|
||||||
var _arrLen = 0;
|
var _arrLen = 0;
|
||||||
var _arrInd = 0;
|
var _arrInd = 0;
|
||||||
|
|
||||||
if(is_array(_surface) && array_length(_surface)) {
|
if(is_array(_surface)) {
|
||||||
_arrLen = array_length(_surface);
|
var _sprd = array_spread(_surface);
|
||||||
_arrInd = safe_mod(round(current_time / 250), array_length(_surface));
|
|
||||||
_surface = _surface[_arrInd];
|
if(array_length(_sprd)) {
|
||||||
|
_arrLen = array_length(_sprd);
|
||||||
|
_arrInd = safe_mod(round(current_time / 250), _arrLen);
|
||||||
|
_surface = _sprd[_arrInd];
|
||||||
|
} else
|
||||||
|
_surface = noone;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(is_instanceof(_surface, __d3dMaterial))
|
if(is_instanceof(_surface, __d3dMaterial)) _surface = _surface.surface;
|
||||||
_surface = _surface.surface;
|
else if(is_instanceof(_surface, dynaSurf)) _surface = array_safe_get_fast(_surface.surfaces, 0, noone);
|
||||||
|
else if(is_instanceof(_surface, Atlas)) _surface = _surface.getSurface();
|
||||||
if(is_instanceof(_surface, dynaSurf))
|
|
||||||
_surface = array_safe_get_fast(_surface.surfaces, 0, noone);
|
|
||||||
|
|
||||||
if(surface_exists(_surface)) {
|
if(surface_exists(_surface)) {
|
||||||
var sfw = surface_get_width(_surface);
|
var sfw = surface_get_width(_surface);
|
||||||
|
|
75
scripts/svg_objects/svg_objects.gml
Normal file
75
scripts/svg_objects/svg_objects.gml
Normal file
|
@ -0,0 +1,75 @@
|
||||||
|
function SVG() constructor {
|
||||||
|
width = 1;
|
||||||
|
height = 1;
|
||||||
|
fill = c_black;
|
||||||
|
bbox = [ 0, 0, 0, 0 ];
|
||||||
|
|
||||||
|
contents = [];
|
||||||
|
}
|
||||||
|
|
||||||
|
function SVG_path() constructor {
|
||||||
|
anchors = [];
|
||||||
|
|
||||||
|
static setDef = function(def) {
|
||||||
|
var _mode = "";
|
||||||
|
var _len = string_length(def);
|
||||||
|
var _ind = 1;
|
||||||
|
var _val = "";
|
||||||
|
var _par = [];
|
||||||
|
|
||||||
|
var _oa = ord("a"), _oz = ord("z");
|
||||||
|
var _oA = ord("A"), _oZ = ord("Z");
|
||||||
|
var _o0 = ord("0"), _o9 = ord("9");
|
||||||
|
|
||||||
|
var _om = ord("-");
|
||||||
|
var _od = ord(".");
|
||||||
|
var _os = ord(" ");
|
||||||
|
|
||||||
|
var _tx = 0;
|
||||||
|
var _ty = 0;
|
||||||
|
|
||||||
|
repeat(_len) {
|
||||||
|
var _chr = string_char_at(def, _ind);
|
||||||
|
var _och = ord(_chr);
|
||||||
|
var _eval = 0;
|
||||||
|
|
||||||
|
if((_och >= _oa && _och <= _oz) || (_och >= _oA && _och <= _oZ))
|
||||||
|
_eval = 2;
|
||||||
|
else if(_och == _os)
|
||||||
|
_eval = 1;
|
||||||
|
else if((_och >= _o0 && _och >= _o9) || _och == _om || _och == _od)
|
||||||
|
_val += _chr;
|
||||||
|
|
||||||
|
if(_eval == 1)
|
||||||
|
array_push(_par, real(_val));
|
||||||
|
|
||||||
|
else if(_eval == 2) {
|
||||||
|
array_push(_par, real(_val));
|
||||||
|
_val = "";
|
||||||
|
|
||||||
|
switch(_mode) {
|
||||||
|
case "M" : //Move to absolute
|
||||||
|
var _nx = array_safe_get(_par, 0);
|
||||||
|
var _ny = array_safe_get(_par, 1);
|
||||||
|
|
||||||
|
_tx = _nx;
|
||||||
|
_ty = _ny;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case "m" : //Move to relative
|
||||||
|
var _nx = array_safe_get(_par, 0);
|
||||||
|
var _ny = array_safe_get(_par, 1);
|
||||||
|
|
||||||
|
_tx += _nx;
|
||||||
|
_ty += _ny;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
_par = [];
|
||||||
|
_mode = _chr;
|
||||||
|
}
|
||||||
|
|
||||||
|
_ind++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
13
scripts/svg_objects/svg_objects.yy
Normal file
13
scripts/svg_objects/svg_objects.yy
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
{
|
||||||
|
"$GMScript":"",
|
||||||
|
"%Name":"svg_objects",
|
||||||
|
"isCompatibility":false,
|
||||||
|
"isDnD":false,
|
||||||
|
"name":"svg_objects",
|
||||||
|
"parent":{
|
||||||
|
"name":"svg",
|
||||||
|
"path":"folders/functions/svg.yy",
|
||||||
|
},
|
||||||
|
"resourceType":"GMScript",
|
||||||
|
"resourceVersion":"2.0",
|
||||||
|
}
|
55
scripts/svg_reader/svg_reader.gml
Normal file
55
scripts/svg_reader/svg_reader.gml
Normal file
|
@ -0,0 +1,55 @@
|
||||||
|
function svg_parse(xmlStr) {
|
||||||
|
if(!is_struct(xmlStr)) return noone;
|
||||||
|
|
||||||
|
if(struct_try_get(xmlStr, "type") != "root") return noone;
|
||||||
|
if(array_empty(xmlStr.children)) return noone;
|
||||||
|
|
||||||
|
var svg_object = xmlStr.children[0];
|
||||||
|
|
||||||
|
if(struct_try_get(svg_object, "type") != "svg") return noone;
|
||||||
|
|
||||||
|
var attr = svg_object.attributes;
|
||||||
|
|
||||||
|
var ww = struct_try_get(attr, "width", 1);
|
||||||
|
var hh = struct_try_get(attr, "height", 1);
|
||||||
|
|
||||||
|
var svg = new SVG();
|
||||||
|
svg.width = toNumber(string_digits(ww));
|
||||||
|
svg.height = toNumber(string_digits(hh));
|
||||||
|
|
||||||
|
if(struct_has(attr, "viewBox")) {
|
||||||
|
var bbox = attr.viewBox;
|
||||||
|
bbox = string_splice(bbox);
|
||||||
|
for (var i = 0, n = array_length(bbox); i < n; i++)
|
||||||
|
bbox[i] = toNumber(string_digits(bbox[i]))
|
||||||
|
svg.bbox = bbox;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(struct_has(attr, "fill")) {
|
||||||
|
svg.fill = attr.fill;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(struct_has(svg_object, "children")) {
|
||||||
|
var _ind = 0;
|
||||||
|
|
||||||
|
for (var i = 0, n = array_length(svg_object.children); i < n; i++) {
|
||||||
|
var _ch = svg_object.children[i];
|
||||||
|
|
||||||
|
switch(_ch.type) {
|
||||||
|
case "path" : svg.contents[_ind++] = svg_parse_path(_ch); break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return svg;
|
||||||
|
}
|
||||||
|
|
||||||
|
function svg_parse_path(pathStr) {
|
||||||
|
var _path = new SVG_path();
|
||||||
|
var attr = pathStr.attributes;
|
||||||
|
|
||||||
|
if(struct_has(attr, "d"))
|
||||||
|
_path.setDef(attr.d)
|
||||||
|
|
||||||
|
return _path;
|
||||||
|
}
|
13
scripts/svg_reader/svg_reader.yy
Normal file
13
scripts/svg_reader/svg_reader.yy
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
{
|
||||||
|
"$GMScript":"",
|
||||||
|
"%Name":"svg_reader",
|
||||||
|
"isCompatibility":false,
|
||||||
|
"isDnD":false,
|
||||||
|
"name":"svg_reader",
|
||||||
|
"parent":{
|
||||||
|
"name":"svg",
|
||||||
|
"path":"folders/functions/svg.yy",
|
||||||
|
},
|
||||||
|
"resourceType":"GMScript",
|
||||||
|
"resourceVersion":"2.0",
|
||||||
|
}
|
|
@ -168,25 +168,25 @@ function textBox(_input, _onModify) : textInput(_input, _onModify) constructor {
|
||||||
} #endregion
|
} #endregion
|
||||||
|
|
||||||
static apply = function(release = false) { #region
|
static apply = function(release = false) { #region
|
||||||
var _input_text_current = _input_text;
|
var _val = _input_text;
|
||||||
disp_x_to = 0;
|
disp_x_to = 0;
|
||||||
|
|
||||||
if(input == TEXTBOX_INPUT.number)
|
if(input == TEXTBOX_INPUT.number)
|
||||||
_input_text_current = evaluateFunction(_input_text);
|
_val = evaluateFunction(_input_text);
|
||||||
|
|
||||||
if(no_empty && _input_text_current == "")
|
if(no_empty && _val == "")
|
||||||
_input_text_current = _last_text;
|
_val = _last_text;
|
||||||
current_value = _input_text_current;
|
current_value = _val;
|
||||||
|
|
||||||
if(release) {
|
if(release) {
|
||||||
if(is_callable(onRelease)) {
|
if(is_callable(onRelease)) {
|
||||||
var _modi = onRelease(_input_text_current);
|
var _modi = onRelease(_val);
|
||||||
if(_modi && IS_PATREON) shake_amount = PREFERENCES.textbox_shake / 4;
|
if(_modi && IS_PATREON) shake_amount = PREFERENCES.textbox_shake / 4;
|
||||||
return _modi;
|
return _modi;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if(is_callable(onModify)) {
|
if(is_callable(onModify)) {
|
||||||
var _modi = onModify(_input_text_current);
|
var _modi = onModify(_val);
|
||||||
if(_modi && IS_PATREON) shake_amount = PREFERENCES.textbox_shake / 4;
|
if(_modi && IS_PATREON) shake_amount = PREFERENCES.textbox_shake / 4;
|
||||||
return _modi;
|
return _modi;
|
||||||
}
|
}
|
||||||
|
|
Binary file not shown.
After Width: | Height: | Size: 1.8 KiB |
Binary file not shown.
After Width: | Height: | Size: 1.8 KiB |
90
sprites/s_node_xml_file_read/s_node_xml_file_read.yy
Normal file
90
sprites/s_node_xml_file_read/s_node_xml_file_read.yy
Normal file
|
@ -0,0 +1,90 @@
|
||||||
|
{
|
||||||
|
"$GMSprite":"",
|
||||||
|
"%Name":"s_node_xml_file_read",
|
||||||
|
"bboxMode":0,
|
||||||
|
"bbox_bottom":63,
|
||||||
|
"bbox_left":0,
|
||||||
|
"bbox_right":63,
|
||||||
|
"bbox_top":1,
|
||||||
|
"collisionKind":1,
|
||||||
|
"collisionTolerance":0,
|
||||||
|
"DynamicTexturePage":false,
|
||||||
|
"edgeFiltering":false,
|
||||||
|
"For3D":false,
|
||||||
|
"frames":[
|
||||||
|
{"$GMSpriteFrame":"","%Name":"cb510786-6e97-4d8d-86c2-22f82318c4c0","name":"cb510786-6e97-4d8d-86c2-22f82318c4c0","resourceType":"GMSpriteFrame","resourceVersion":"2.0",},
|
||||||
|
],
|
||||||
|
"gridX":0,
|
||||||
|
"gridY":0,
|
||||||
|
"height":64,
|
||||||
|
"HTile":false,
|
||||||
|
"layers":[
|
||||||
|
{"$GMImageLayer":"","%Name":"8524faf6-02cd-4a2a-84d4-39b97417bb07","blendMode":0,"displayName":"default","isLocked":false,"name":"8524faf6-02cd-4a2a-84d4-39b97417bb07","opacity":100.0,"resourceType":"GMImageLayer","resourceVersion":"2.0","visible":true,},
|
||||||
|
],
|
||||||
|
"name":"s_node_xml_file_read",
|
||||||
|
"nineSlice":null,
|
||||||
|
"origin":4,
|
||||||
|
"parent":{
|
||||||
|
"name":"IO",
|
||||||
|
"path":"folders/nodes/icons/IO.yy",
|
||||||
|
},
|
||||||
|
"preMultiplyAlpha":false,
|
||||||
|
"resourceType":"GMSprite",
|
||||||
|
"resourceVersion":"2.0",
|
||||||
|
"sequence":{
|
||||||
|
"$GMSequence":"",
|
||||||
|
"%Name":"s_node_xml_file_read",
|
||||||
|
"autoRecord":true,
|
||||||
|
"backdropHeight":768,
|
||||||
|
"backdropImageOpacity":0.5,
|
||||||
|
"backdropImagePath":"",
|
||||||
|
"backdropWidth":1366,
|
||||||
|
"backdropXOffset":0.0,
|
||||||
|
"backdropYOffset":0.0,
|
||||||
|
"events":{
|
||||||
|
"$KeyframeStore<MessageEventKeyframe>":"",
|
||||||
|
"Keyframes":[],
|
||||||
|
"resourceType":"KeyframeStore<MessageEventKeyframe>",
|
||||||
|
"resourceVersion":"2.0",
|
||||||
|
},
|
||||||
|
"eventStubScript":null,
|
||||||
|
"eventToFunction":{},
|
||||||
|
"length":1.0,
|
||||||
|
"lockOrigin":false,
|
||||||
|
"moments":{
|
||||||
|
"$KeyframeStore<MomentsEventKeyframe>":"",
|
||||||
|
"Keyframes":[],
|
||||||
|
"resourceType":"KeyframeStore<MomentsEventKeyframe>",
|
||||||
|
"resourceVersion":"2.0",
|
||||||
|
},
|
||||||
|
"name":"s_node_xml_file_read",
|
||||||
|
"playback":1,
|
||||||
|
"playbackSpeed":30.0,
|
||||||
|
"playbackSpeedType":0,
|
||||||
|
"resourceType":"GMSequence",
|
||||||
|
"resourceVersion":"2.0",
|
||||||
|
"showBackdrop":true,
|
||||||
|
"showBackdropImage":false,
|
||||||
|
"timeUnits":1,
|
||||||
|
"tracks":[
|
||||||
|
{"$GMSpriteFramesTrack":"","builtinName":0,"events":[],"inheritsTrackColour":true,"interpolation":1,"isCreationTrack":false,"keyframes":{"$KeyframeStore<SpriteFrameKeyframe>":"","Keyframes":[
|
||||||
|
{"$Keyframe<SpriteFrameKeyframe>":"","Channels":{
|
||||||
|
"0":{"$SpriteFrameKeyframe":"","Id":{"name":"cb510786-6e97-4d8d-86c2-22f82318c4c0","path":"sprites/s_node_xml_file_read/s_node_xml_file_read.yy",},"resourceType":"SpriteFrameKeyframe","resourceVersion":"2.0",},
|
||||||
|
},"Disabled":false,"id":"2775a55d-758b-4271-82d2-0803a375c147","IsCreationKey":false,"Key":0.0,"Length":1.0,"resourceType":"Keyframe<SpriteFrameKeyframe>","resourceVersion":"2.0","Stretch":false,},
|
||||||
|
],"resourceType":"KeyframeStore<SpriteFrameKeyframe>","resourceVersion":"2.0",},"modifiers":[],"name":"frames","resourceType":"GMSpriteFramesTrack","resourceVersion":"2.0","spriteId":null,"trackColour":0,"tracks":[],"traits":0,},
|
||||||
|
],
|
||||||
|
"visibleRange":null,
|
||||||
|
"volume":1.0,
|
||||||
|
"xorigin":32,
|
||||||
|
"yorigin":32,
|
||||||
|
},
|
||||||
|
"swatchColours":null,
|
||||||
|
"swfPrecision":0.5,
|
||||||
|
"textureGroupId":{
|
||||||
|
"name":"Default",
|
||||||
|
"path":"texturegroups/Default",
|
||||||
|
},
|
||||||
|
"type":0,
|
||||||
|
"VTile":false,
|
||||||
|
"width":64,
|
||||||
|
}
|
Binary file not shown.
After Width: | Height: | Size: 1.7 KiB |
Binary file not shown.
After Width: | Height: | Size: 1.7 KiB |
90
sprites/s_node_xml_file_write/s_node_xml_file_write.yy
Normal file
90
sprites/s_node_xml_file_write/s_node_xml_file_write.yy
Normal file
|
@ -0,0 +1,90 @@
|
||||||
|
{
|
||||||
|
"$GMSprite":"",
|
||||||
|
"%Name":"s_node_xml_file_write",
|
||||||
|
"bboxMode":0,
|
||||||
|
"bbox_bottom":63,
|
||||||
|
"bbox_left":0,
|
||||||
|
"bbox_right":63,
|
||||||
|
"bbox_top":1,
|
||||||
|
"collisionKind":1,
|
||||||
|
"collisionTolerance":0,
|
||||||
|
"DynamicTexturePage":false,
|
||||||
|
"edgeFiltering":false,
|
||||||
|
"For3D":false,
|
||||||
|
"frames":[
|
||||||
|
{"$GMSpriteFrame":"","%Name":"418adc75-06fe-4a3d-970c-822dcda18fe2","name":"418adc75-06fe-4a3d-970c-822dcda18fe2","resourceType":"GMSpriteFrame","resourceVersion":"2.0",},
|
||||||
|
],
|
||||||
|
"gridX":0,
|
||||||
|
"gridY":0,
|
||||||
|
"height":64,
|
||||||
|
"HTile":false,
|
||||||
|
"layers":[
|
||||||
|
{"$GMImageLayer":"","%Name":"f8f81117-f5b7-4678-a5b5-6614fa73aced","blendMode":0,"displayName":"default","isLocked":false,"name":"f8f81117-f5b7-4678-a5b5-6614fa73aced","opacity":100.0,"resourceType":"GMImageLayer","resourceVersion":"2.0","visible":true,},
|
||||||
|
],
|
||||||
|
"name":"s_node_xml_file_write",
|
||||||
|
"nineSlice":null,
|
||||||
|
"origin":4,
|
||||||
|
"parent":{
|
||||||
|
"name":"IO",
|
||||||
|
"path":"folders/nodes/icons/IO.yy",
|
||||||
|
},
|
||||||
|
"preMultiplyAlpha":false,
|
||||||
|
"resourceType":"GMSprite",
|
||||||
|
"resourceVersion":"2.0",
|
||||||
|
"sequence":{
|
||||||
|
"$GMSequence":"",
|
||||||
|
"%Name":"s_node_xml_file_write",
|
||||||
|
"autoRecord":true,
|
||||||
|
"backdropHeight":768,
|
||||||
|
"backdropImageOpacity":0.5,
|
||||||
|
"backdropImagePath":"",
|
||||||
|
"backdropWidth":1366,
|
||||||
|
"backdropXOffset":0.0,
|
||||||
|
"backdropYOffset":0.0,
|
||||||
|
"events":{
|
||||||
|
"$KeyframeStore<MessageEventKeyframe>":"",
|
||||||
|
"Keyframes":[],
|
||||||
|
"resourceType":"KeyframeStore<MessageEventKeyframe>",
|
||||||
|
"resourceVersion":"2.0",
|
||||||
|
},
|
||||||
|
"eventStubScript":null,
|
||||||
|
"eventToFunction":{},
|
||||||
|
"length":1.0,
|
||||||
|
"lockOrigin":false,
|
||||||
|
"moments":{
|
||||||
|
"$KeyframeStore<MomentsEventKeyframe>":"",
|
||||||
|
"Keyframes":[],
|
||||||
|
"resourceType":"KeyframeStore<MomentsEventKeyframe>",
|
||||||
|
"resourceVersion":"2.0",
|
||||||
|
},
|
||||||
|
"name":"s_node_xml_file_write",
|
||||||
|
"playback":1,
|
||||||
|
"playbackSpeed":30.0,
|
||||||
|
"playbackSpeedType":0,
|
||||||
|
"resourceType":"GMSequence",
|
||||||
|
"resourceVersion":"2.0",
|
||||||
|
"showBackdrop":true,
|
||||||
|
"showBackdropImage":false,
|
||||||
|
"timeUnits":1,
|
||||||
|
"tracks":[
|
||||||
|
{"$GMSpriteFramesTrack":"","builtinName":0,"events":[],"inheritsTrackColour":true,"interpolation":1,"isCreationTrack":false,"keyframes":{"$KeyframeStore<SpriteFrameKeyframe>":"","Keyframes":[
|
||||||
|
{"$Keyframe<SpriteFrameKeyframe>":"","Channels":{
|
||||||
|
"0":{"$SpriteFrameKeyframe":"","Id":{"name":"418adc75-06fe-4a3d-970c-822dcda18fe2","path":"sprites/s_node_xml_file_write/s_node_xml_file_write.yy",},"resourceType":"SpriteFrameKeyframe","resourceVersion":"2.0",},
|
||||||
|
},"Disabled":false,"id":"de107933-f17f-40e9-961c-6eb9e77b2f13","IsCreationKey":false,"Key":0.0,"Length":1.0,"resourceType":"Keyframe<SpriteFrameKeyframe>","resourceVersion":"2.0","Stretch":false,},
|
||||||
|
],"resourceType":"KeyframeStore<SpriteFrameKeyframe>","resourceVersion":"2.0",},"modifiers":[],"name":"frames","resourceType":"GMSpriteFramesTrack","resourceVersion":"2.0","spriteId":null,"trackColour":0,"tracks":[],"traits":0,},
|
||||||
|
],
|
||||||
|
"visibleRange":null,
|
||||||
|
"volume":1.0,
|
||||||
|
"xorigin":32,
|
||||||
|
"yorigin":32,
|
||||||
|
},
|
||||||
|
"swatchColours":null,
|
||||||
|
"swfPrecision":0.5,
|
||||||
|
"textureGroupId":{
|
||||||
|
"name":"Default",
|
||||||
|
"path":"texturegroups/Default",
|
||||||
|
},
|
||||||
|
"type":0,
|
||||||
|
"VTile":false,
|
||||||
|
"width":64,
|
||||||
|
}
|
Loading…
Reference in a new issue