From 372107426e5bc5d0f12a578bb5ac3285c57723f7 Mon Sep 17 00:00:00 2001 From: Tanasart Date: Thu, 6 Jun 2024 14:54:13 +0700 Subject: [PATCH] bugs --- PixelComposer.resource_order | 21 +- PixelComposer.yyp | 17 + datafiles/snap_license.txt | 21 ++ objects/o_main/Create_0.gml | 8 + .../SnapBufferReadXML/SnapBufferReadXML.gml | 306 ++++++++++++++++++ .../SnapBufferReadXML/SnapBufferReadXML.yy | 13 + .../SnapBufferWriteXML/SnapBufferWriteXML.gml | 117 +++++++ .../SnapBufferWriteXML/SnapBufferWriteXML.yy | 13 + scripts/SnapFromXML/SnapFromXML.gml | 15 + scripts/SnapFromXML/SnapFromXML.yy | 13 + scripts/SnapToXML/SnapToXML.gml | 16 + scripts/SnapToXML/SnapToXML.yy | 13 + scripts/__surface/__surface.gml | 7 + scripts/globals/globals.gml | 6 +- scripts/nodeValue_drawer/nodeValue_drawer.gml | 15 +- .../node_image_animated.yy | 4 +- scripts/node_image_gif/node_image_gif.yy | 4 +- .../node_image_sequence.yy | 4 +- scripts/node_image_sheet/node_image_sheet.yy | 4 +- scripts/node_math/node_math.gml | 85 +++-- scripts/node_processor/node_processor.gml | 77 +++-- scripts/node_registry/node_registry.gml | 5 +- .../node_sequence_anim/node_sequence_anim.yy | 4 +- scripts/node_svg/node_svg.gml | 108 +++++++ scripts/node_svg/node_svg.yy | 13 + scripts/node_transform/node_transform.gml | 29 +- scripts/node_value_types/node_value_types.gml | 4 - .../node_xml_file_read/node_xml_file_read.gml | 114 +++++++ .../node_xml_file_read/node_xml_file_read.yy | 13 + .../node_xml_file_write.gml | 42 +++ .../node_xml_file_write.yy | 13 + scripts/surfaceBox/surfaceBox.gml | 21 +- scripts/svg_objects/svg_objects.gml | 75 +++++ scripts/svg_objects/svg_objects.yy | 13 + scripts/svg_reader/svg_reader.gml | 55 ++++ scripts/svg_reader/svg_reader.yy | 13 + scripts/textBox/textBox.gml | 14 +- .../cb510786-6e97-4d8d-86c2-22f82318c4c0.png | Bin 0 -> 1801 bytes .../8524faf6-02cd-4a2a-84d4-39b97417bb07.png | Bin 0 -> 1801 bytes .../s_node_xml_file_read.yy | 90 ++++++ .../418adc75-06fe-4a3d-970c-822dcda18fe2.png | Bin 0 -> 1757 bytes .../f8f81117-f5b7-4678-a5b5-6614fa73aced.png | Bin 0 -> 1757 bytes .../s_node_xml_file_write.yy | 90 ++++++ 43 files changed, 1379 insertions(+), 116 deletions(-) create mode 100644 datafiles/snap_license.txt create mode 100644 scripts/SnapBufferReadXML/SnapBufferReadXML.gml create mode 100644 scripts/SnapBufferReadXML/SnapBufferReadXML.yy create mode 100644 scripts/SnapBufferWriteXML/SnapBufferWriteXML.gml create mode 100644 scripts/SnapBufferWriteXML/SnapBufferWriteXML.yy create mode 100644 scripts/SnapFromXML/SnapFromXML.gml create mode 100644 scripts/SnapFromXML/SnapFromXML.yy create mode 100644 scripts/SnapToXML/SnapToXML.gml create mode 100644 scripts/SnapToXML/SnapToXML.yy create mode 100644 scripts/node_svg/node_svg.gml create mode 100644 scripts/node_svg/node_svg.yy create mode 100644 scripts/node_xml_file_read/node_xml_file_read.gml create mode 100644 scripts/node_xml_file_read/node_xml_file_read.yy create mode 100644 scripts/node_xml_file_write/node_xml_file_write.gml create mode 100644 scripts/node_xml_file_write/node_xml_file_write.yy create mode 100644 scripts/svg_objects/svg_objects.gml create mode 100644 scripts/svg_objects/svg_objects.yy create mode 100644 scripts/svg_reader/svg_reader.gml create mode 100644 scripts/svg_reader/svg_reader.yy create mode 100644 sprites/s_node_xml_file_read/cb510786-6e97-4d8d-86c2-22f82318c4c0.png create mode 100644 sprites/s_node_xml_file_read/layers/cb510786-6e97-4d8d-86c2-22f82318c4c0/8524faf6-02cd-4a2a-84d4-39b97417bb07.png create mode 100644 sprites/s_node_xml_file_read/s_node_xml_file_read.yy create mode 100644 sprites/s_node_xml_file_write/418adc75-06fe-4a3d-970c-822dcda18fe2.png create mode 100644 sprites/s_node_xml_file_write/layers/418adc75-06fe-4a3d-970c-822dcda18fe2/f8f81117-f5b7-4678-a5b5-6614fa73aced.png create mode 100644 sprites/s_node_xml_file_write/s_node_xml_file_write.yy diff --git a/PixelComposer.resource_order b/PixelComposer.resource_order index 980e1ccac..1e812a73e 100644 --- a/PixelComposer.resource_order +++ b/PixelComposer.resource_order @@ -9,6 +9,8 @@ {"name":"GMD3D11","order":2,"path":"folders/_extensions/GMD3D11.yy",}, {"name":"MAC","order":3,"path":"folders/_extensions/MAC.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":"camera","order":7,"path":"folders/functions/3d/camera.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":"Internal","order":7,"path":"folders/functions/fluid_sim/Internal.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":"__base__","order":11,"path":"folders/nodes/data/__base__.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":"group","order":18,"path":"folders/nodes/data/group.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":"iterate","order":20,"path":"folders/nodes/data/iterate.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_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_image_animated","order":2,"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_animated","order":1,"path":"scripts/node_image_animated/node_image_animated.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_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_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",}, @@ -974,7 +978,7 @@ {"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","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","order":13,"path":"scripts/node_shadow/node_shadow.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_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_svg","order":6,"path":"scripts/node_svg/node_svg.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_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_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_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":"nodeValue_drawer","order":1,"path":"scripts/nodeValue_drawer/nodeValue_drawer.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":"shell_functions","order":20,"path":"scripts/shell_functions/shell_functions.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":"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",}, @@ -1187,6 +1197,7 @@ {"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":"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":"textArrayBox","order":1,"path":"scripts/textArrayBox/textArrayBox.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","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_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_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",}, diff --git a/PixelComposer.yyp b/PixelComposer.yyp index 095a31d14..ed100ca94 100644 --- a/PixelComposer.yyp +++ b/PixelComposer.yyp @@ -35,6 +35,8 @@ {"$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":"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":"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",}, @@ -88,6 +90,7 @@ {"$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":"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":"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",}, @@ -154,6 +157,7 @@ {"$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":"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":"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",}, @@ -466,6 +470,8 @@ {"$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":"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":"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",}, @@ -1482,6 +1488,7 @@ {"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_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_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",},}, @@ -1546,6 +1553,8 @@ {"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_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":"nodeValue_drawer","path":"scripts/nodeValue_drawer/nodeValue_drawer.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":"slider","path":"scripts/slider/slider.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_loader","path":"scripts/sprite_loader/sprite_loader.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_get_palette","path":"scripts/surface_get_palette/surface_get_palette.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":"text_file","path":"scripts/text_file/text_file.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","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_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_zoom","path":"sprites/s_node_zoom/s_node_zoom.yy",},}, {"id":{"name":"s_patreon_banner","path":"sprites/s_patreon_banner/s_patreon_banner.yy",},}, diff --git a/datafiles/snap_license.txt b/datafiles/snap_license.txt new file mode 100644 index 000000000..dfd17b121 --- /dev/null +++ b/datafiles/snap_license.txt @@ -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. diff --git a/objects/o_main/Create_0.gml b/objects/o_main/Create_0.gml index e51090d7f..e9a26a8e0 100644 --- a/objects/o_main/Create_0.gml +++ b/objects/o_main/Create_0.gml @@ -210,6 +210,14 @@ node = Node_create_WAV_File_Read_path(_x, _y, p); 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 "cpxc" : LOAD_PATH(p); diff --git a/scripts/SnapBufferReadXML/SnapBufferReadXML.gml b/scripts/SnapBufferReadXML/SnapBufferReadXML.gml new file mode 100644 index 000000000..7ff5d2c10 --- /dev/null +++ b/scripts/SnapBufferReadXML/SnapBufferReadXML.gml @@ -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; +} diff --git a/scripts/SnapBufferReadXML/SnapBufferReadXML.yy b/scripts/SnapBufferReadXML/SnapBufferReadXML.yy new file mode 100644 index 000000000..85729759c --- /dev/null +++ b/scripts/SnapBufferReadXML/SnapBufferReadXML.yy @@ -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", +} \ No newline at end of file diff --git a/scripts/SnapBufferWriteXML/SnapBufferWriteXML.gml b/scripts/SnapBufferWriteXML/SnapBufferWriteXML.gml new file mode 100644 index 000000000..b90846d31 --- /dev/null +++ b/scripts/SnapBufferWriteXML/SnapBufferWriteXML.gml @@ -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, "\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, ""); +} diff --git a/scripts/SnapBufferWriteXML/SnapBufferWriteXML.yy b/scripts/SnapBufferWriteXML/SnapBufferWriteXML.yy new file mode 100644 index 000000000..5f2dac3a9 --- /dev/null +++ b/scripts/SnapBufferWriteXML/SnapBufferWriteXML.yy @@ -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", +} \ No newline at end of file diff --git a/scripts/SnapFromXML/SnapFromXML.gml b/scripts/SnapFromXML/SnapFromXML.gml new file mode 100644 index 000000000..d98571c86 --- /dev/null +++ b/scripts/SnapFromXML/SnapFromXML.gml @@ -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; +} diff --git a/scripts/SnapFromXML/SnapFromXML.yy b/scripts/SnapFromXML/SnapFromXML.yy new file mode 100644 index 000000000..55c1b0d12 --- /dev/null +++ b/scripts/SnapFromXML/SnapFromXML.yy @@ -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", +} \ No newline at end of file diff --git a/scripts/SnapToXML/SnapToXML.gml b/scripts/SnapToXML/SnapToXML.gml new file mode 100644 index 000000000..8902c66a2 --- /dev/null +++ b/scripts/SnapToXML/SnapToXML.gml @@ -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; +} diff --git a/scripts/SnapToXML/SnapToXML.yy b/scripts/SnapToXML/SnapToXML.yy new file mode 100644 index 000000000..4d048219c --- /dev/null +++ b/scripts/SnapToXML/SnapToXML.yy @@ -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", +} \ No newline at end of file diff --git a/scripts/__surface/__surface.gml b/scripts/__surface/__surface.gml index 5fb741396..c301c87b5 100644 --- a/scripts/__surface/__surface.gml +++ b/scripts/__surface/__surface.gml @@ -27,6 +27,13 @@ function SurfaceAtlasFast(surface, _x = 0, _y = 0, rot = 0, sx = 1, sy = 1, blen 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 { diff --git a/scripts/globals/globals.gml b/scripts/globals/globals.gml index c4d0de3fc..42f25b7cc 100644 --- a/scripts/globals/globals.gml +++ b/scripts/globals/globals.gml @@ -36,10 +36,10 @@ globalvar VERSION, SAVE_VERSION, VERSION_STRING, BUILD_NUMBER, LATEST_VERSION; LATEST_VERSION = 11700; - VERSION = 11720; + VERSION = 11722; SAVE_VERSION = 11690; - VERSION_STRING = "1.17.2.0"; - BUILD_NUMBER = 11720; + VERSION_STRING = "1.17.2.2"; + BUILD_NUMBER = 11721; globalvar HOTKEYS, HOTKEY_CONTEXT; HOTKEYS = ds_map_create(); diff --git a/scripts/nodeValue_drawer/nodeValue_drawer.gml b/scripts/nodeValue_drawer/nodeValue_drawer.gml index f4dc9b361..14b7cd45b 100644 --- a/scripts/nodeValue_drawer/nodeValue_drawer.gml +++ b/scripts/nodeValue_drawer/nodeValue_drawer.gml @@ -279,13 +279,7 @@ function drawWidget(xx, yy, ww, _m, jun, global_var = true, _hover = false, _foc var widH = widExtend? editBoxH : 0; 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 var expValid = jun.expTree != noone && jun.expTree.validate(); 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); 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 } else if(wid && jun.display_type != VALUE_DISPLAY.none) { #region edit widget diff --git a/scripts/node_image_animated/node_image_animated.yy b/scripts/node_image_animated/node_image_animated.yy index 89ea1fbb9..8913fe95f 100644 --- a/scripts/node_image_animated/node_image_animated.yy +++ b/scripts/node_image_animated/node_image_animated.yy @@ -5,8 +5,8 @@ "isDnD":false, "name":"node_image_animated", "parent":{ - "name":"io", - "path":"folders/nodes/data/io.yy", + "name":"image", + "path":"folders/nodes/data/io/image.yy", }, "resourceType":"GMScript", "resourceVersion":"2.0", diff --git a/scripts/node_image_gif/node_image_gif.yy b/scripts/node_image_gif/node_image_gif.yy index 3ae6cad17..2c63de037 100644 --- a/scripts/node_image_gif/node_image_gif.yy +++ b/scripts/node_image_gif/node_image_gif.yy @@ -5,8 +5,8 @@ "isDnD":false, "name":"node_image_gif", "parent":{ - "name":"io", - "path":"folders/nodes/data/io.yy", + "name":"image", + "path":"folders/nodes/data/io/image.yy", }, "resourceType":"GMScript", "resourceVersion":"2.0", diff --git a/scripts/node_image_sequence/node_image_sequence.yy b/scripts/node_image_sequence/node_image_sequence.yy index c6fa97509..218fbb300 100644 --- a/scripts/node_image_sequence/node_image_sequence.yy +++ b/scripts/node_image_sequence/node_image_sequence.yy @@ -5,8 +5,8 @@ "isDnD":false, "name":"node_image_sequence", "parent":{ - "name":"io", - "path":"folders/nodes/data/io.yy", + "name":"image", + "path":"folders/nodes/data/io/image.yy", }, "resourceType":"GMScript", "resourceVersion":"2.0", diff --git a/scripts/node_image_sheet/node_image_sheet.yy b/scripts/node_image_sheet/node_image_sheet.yy index 21e9531ac..596a4c3bc 100644 --- a/scripts/node_image_sheet/node_image_sheet.yy +++ b/scripts/node_image_sheet/node_image_sheet.yy @@ -5,8 +5,8 @@ "isDnD":false, "name":"node_image_sheet", "parent":{ - "name":"io", - "path":"folders/nodes/data/io.yy", + "name":"image", + "path":"folders/nodes/data/io/image.yy", }, "resourceType":"GMScript", "resourceVersion":"2.0", diff --git a/scripts/node_math/node_math.gml b/scripts/node_math/node_math.gml index 1fd66f298..140c77a31 100644 --- a/scripts/node_math/node_math.gml +++ b/scripts/node_math/node_math.gml @@ -17,11 +17,13 @@ enum MATH_OPERATOR { round, lerp, - abs + abs, + + clamp, } #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 = {}) { 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 "abs" : node.inputs[| 0].setValue(MATH_OPERATOR.abs); break; + + case "clamp" : node.inputs[| 0].setValue(MATH_OPERATOR.clamp); break; } #endregion 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) .setDisplay(VALUE_DISPLAY.enum_scroll, [ /* 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(); 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.abs : return abs(a); + + case MATH_OPERATOR.clamp : return clamp(a, b, c); } return 0; } #endregion @@ -141,7 +147,6 @@ function Node_Math(_x, _y, _group = noone) : Node(_x, _y, _group) constructor { break; } - inputs[| 2].name = "b"; inputs[| 5].setVisible(false); 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.root : case MATH_OPERATOR.modulo : - inputs[| 2].setVisible(true); + inputs[| 2].name = "b"; + + inputs[| 2].setVisible(true, true); break; + case MATH_OPERATOR.sin : case MATH_OPERATOR.cos : case MATH_OPERATOR.tan : - inputs[| 2].setVisible(true); inputs[| 2].name = "Amplitude"; + + inputs[| 2].setVisible(true, true); break; + case MATH_OPERATOR.floor : case MATH_OPERATOR.ceiling : case MATH_OPERATOR.round : case MATH_OPERATOR.abs : inputs[| 2].setVisible(false); break; + case MATH_OPERATOR.lerp : - inputs[| 2].setVisible(true); - inputs[| 5].setVisible(true); + inputs[| 2].name = "To"; + 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; default: return; } } #endregion function evalArray(a, b, c = 0) { #region - var as = is_array(a); - var bs = is_array(b); - var cs = is_array(c); + var _as = is_array(a); + var _bs = is_array(b); + var _cs = is_array(c); - if(!as && !bs && !cs) + if(!_as && !_bs && !_cs) return _eval(a, b, c); - if(!as) a = [ a ]; - if(!bs) b = [ b ]; - if(!cs) c = [ c ]; + if(!_as) a = [ a ]; + if(!_bs) b = [ b ]; + if(!_cs) c = [ c ]; var al = array_length(a); 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 use_mod = getInputData(0); + use_deg = getInputData(3); + var a = getInputData(1); var b = getInputData(2); - use_deg = getInputData(3); var c = getInputData(5); var val = evalArray(a, b, c); @@ -218,29 +241,31 @@ function Node_Math(_x, _y, _group = noone) : Node(_x, _y, _group) constructor { draw_set_text(f_sdf, fa_center, fa_center, COLORS._main_text); var str = ""; switch(getInputData(0)) { - case MATH_OPERATOR.add : str = "+"; break; - case MATH_OPERATOR.subtract : str = "-"; break; - case MATH_OPERATOR.multiply : str = "*"; break; - case MATH_OPERATOR.divide : str = "/"; break; - case MATH_OPERATOR.power : str = "pow"; break; - case MATH_OPERATOR.root : str = "root"; break; + case MATH_OPERATOR.add : str = "+"; break; + case MATH_OPERATOR.subtract : str = "-"; break; + case MATH_OPERATOR.multiply : str = "*"; break; + case MATH_OPERATOR.divide : str = "/"; break; + case MATH_OPERATOR.power : str = "pow"; break; + case MATH_OPERATOR.root : str = "root"; break; - case MATH_OPERATOR.sin : str = "sin"; break; - case MATH_OPERATOR.cos : str = "cos"; break; - case MATH_OPERATOR.tan : str = "tan"; break; - case MATH_OPERATOR.modulo : str = "mod"; break; + case MATH_OPERATOR.sin : str = "sin"; break; + case MATH_OPERATOR.cos : str = "cos"; break; + case MATH_OPERATOR.tan : str = "tan"; break; + case MATH_OPERATOR.modulo : str = "mod"; break; case MATH_OPERATOR.floor : str = "floor"; break; - case MATH_OPERATOR.ceiling : str = "ceil"; break; + case MATH_OPERATOR.ceiling : str = "ceil"; break; case MATH_OPERATOR.round : str = "round"; break; - case MATH_OPERATOR.lerp : str = "lerp"; break; - case MATH_OPERATOR.abs : str = "abs"; break; + case MATH_OPERATOR.lerp : str = "lerp"; break; + case MATH_OPERATOR.abs : str = "abs"; break; + + case MATH_OPERATOR.clamp : str = "clamp"; break; default: return; } var bbox = drawGetBbox(xx, yy, _s); 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 } \ No newline at end of file diff --git a/scripts/node_processor/node_processor.gml b/scripts/node_processor/node_processor.gml index 7f8f49400..43b2c9dde 100644 --- a/scripts/node_processor/node_processor.gml +++ b/scripts/node_processor/node_processor.gml @@ -22,7 +22,7 @@ function Node_Processor(_x, _y, _group = noone) : Node(_x, _y, _group) construct batch_output = false; //Run processData once with all outputs as array. - icon = THEME.node_processor_icon; + icon = THEME.node_processor_icon; array_push(attributeEditors, "Array processor"); array_push(attributeEditors, [ "Array process type", function() { return attributes.array_process; }, @@ -217,49 +217,58 @@ function Node_Processor(_x, _y, _group = noone) : Node(_x, _y, _group) construct } #endregion static processBatchOutput = function() { #region - for(var i = 0; i < ds_list_size(outputs); i++) { - if(outputs[| i].type != VALUE_TYPE.surface) continue; - var _res = outputs[| i].getValue(); - surface_array_free(_res); - outputs[| i].setValue(noone); - } + var _is = ds_list_size(inputs); + var _os = ds_list_size(outputs); + var _outVal = array_create(_os); + for(var i = 0; i < _os; i++) + _outVal[i] = outputs[| i].getValue(); + if(process_amount == 1) { - var data = processData(noone, inputs_data, 0, 0); - for(var i = 0; i < ds_list_size(outputs); i++) { - var _outp = array_safe_get_fast(data, i, undefined); - if(_outp == undefined) continue; - outputs[| i].setValue(_outp); - } - } else { - var _outputs = array_create(ds_list_size(outputs)); - 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]; + current_data = inputs_data; + var data = processData(_outVal, inputs_data, 0, 0); + + if(_os == 1) { + outputs[| 0].setValue(data); - var data = processData(0, _data, 0, l); - for(var i = 0; i < ds_list_size(outputs); i++) { + } else { + for(var i = 0; i < _os; i++) { var _outp = array_safe_get_fast(data, i, undefined); - _outputs[i][l] = _outp; + if(_outp == undefined) continue; + outputs[| i].setValue(_outp); } } - - for( var i = 0, n = ds_list_size(outputs); i < n; i++ ) - outputs[| i].setValue(_outputs[i]); + + return; } + + var _inputs = array_create(_is); + var _outputs = array_create(_os); + + for( var l = 0; l < process_amount; l++ ) { + + for(var i = 0; i < _is; i++) + _inputs[i] = all_inputs[i][l]; + + 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 = _os; i < n; i++ ) + outputs[| i].setValue(_outputs[i]); + } #endregion static processOutput = function() { #region - var val; - for(var i = 0; i < ds_list_size(outputs); i++) { - if(outputs[| i].process_array) { - val = processDataArray(i); - if(val == undefined) continue; - } else - val = processData(noone, noone, i); - outputs[| i].setValue(val); + var val = outputs[| i].process_array? processDataArray(i) : processData(outputs[| i].getValue(), noone, i); + if(val != undefined) + outputs[| i].setValue(val); } } #endregion @@ -341,8 +350,10 @@ function Node_Processor(_x, _y, _group = noone) : Node(_x, _y, _group) construct static update = function(frame = CURRENT_FRAME) { #region processData_prebatch(); + if(batch_output) processBatchOutput(); else processOutput(); + processData_postbatch(); postProcess(); diff --git a/scripts/node_registry/node_registry.gml b/scripts/node_registry/node_registry.gml index 06160152d..a79809562 100644 --- a/scripts/node_registry/node_registry.gml +++ b/scripts/node_registry/node_registry.gml @@ -486,7 +486,7 @@ function __initNodes() { //\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\ - var input = ds_list_create(); #region //input + var input = ds_list_create(); #region //io addNodeCatagory("IO", input); ds_list_add(input, "Images"); 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, "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, "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."); 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, "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, "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 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); diff --git a/scripts/node_sequence_anim/node_sequence_anim.yy b/scripts/node_sequence_anim/node_sequence_anim.yy index 2e2e929c7..5b72a9ad2 100644 --- a/scripts/node_sequence_anim/node_sequence_anim.yy +++ b/scripts/node_sequence_anim/node_sequence_anim.yy @@ -5,8 +5,8 @@ "isDnD":false, "name":"node_sequence_anim", "parent":{ - "name":"io", - "path":"folders/nodes/data/io.yy", + "name":"image", + "path":"folders/nodes/data/io/image.yy", }, "resourceType":"GMScript", "resourceVersion":"2.0", diff --git a/scripts/node_svg/node_svg.gml b/scripts/node_svg/node_svg.gml new file mode 100644 index 000000000..f4952396d --- /dev/null +++ b/scripts/node_svg/node_svg.gml @@ -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 +} \ No newline at end of file diff --git a/scripts/node_svg/node_svg.yy b/scripts/node_svg/node_svg.yy new file mode 100644 index 000000000..d9225b69a --- /dev/null +++ b/scripts/node_svg/node_svg.yy @@ -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", +} \ No newline at end of file diff --git a/scripts/node_transform/node_transform.gml b/scripts/node_transform/node_transform.gml index 43c6227f5..61778e2a8 100644 --- a/scripts/node_transform/node_transform.gml +++ b/scripts/node_transform/node_transform.gml @@ -7,6 +7,7 @@ enum OUTPUT_SCALING { function Node_Transform(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { name = "Transform"; + batch_output = true; inputs[| 0] = nodeValue("Surface in", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone); @@ -66,7 +67,7 @@ function Node_Transform(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) inputs[| 14] = nodeValue("Alpha", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 1) .setDisplay(VALUE_DISPLAY.slider); - input_display_list = [ 11, 0, + input_display_list = [ 11, 0, ["Output", true], 9, 1, 7, ["Position", false], 2, 10, ["Rotation", false], 3, 5, 8, @@ -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[| 1] = nodeValue("Dimension", self, JUNCTION_CONNECT.output, VALUE_TYPE.integer, [ 1, 1 ]) + .setDisplay(VALUE_DISPLAY.vector) + .setVisible(false); + attribute_surface_depth(); attribute_interpolation(); @@ -180,10 +185,7 @@ function Node_Transform(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) } } #endregion - // static processData_prebatch = function() { shader_preset_interpolation(); } - // static processData_postbatch = function() { shader_postset_interpolation(); } - - static processData = function(_outSurf, _data, _output_index, _array_index) { #region + static processData = function(_outData, _data, _output_index, _array_index) { #region var ins = _data[0]; 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 alp = _data[14]; + var _outSurf = _outData[0]; + var _outRes = array_create(ds_list_size(outputs)); + var cDep = attrDepth(); var ww = surface_get_width_safe(ins); var hh = surface_get_height_safe(ins); var _ww = ww; 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 case OUTPUT_SCALING.same_as_input : @@ -242,8 +251,12 @@ function Node_Transform(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) break; } #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); + _outRes[0] = _outSurf; anc[0] *= ww * sca[0]; 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] ], ]; - return _outSurf; + return _outRes; } #endregion overlay_dragging = 0; diff --git a/scripts/node_value_types/node_value_types.gml b/scripts/node_value_types/node_value_types.gml index aaf8f369d..891a9c9b3 100644 --- a/scripts/node_value_types/node_value_types.gml +++ b/scripts/node_value_types/node_value_types.gml @@ -521,10 +521,6 @@ function nodeValueUnit(_nodeValue) constructor { #region return _val; } - } else { - base = array_safe_get(base, 0, 1); - if(inv) base = base == 0? 0 : 1 / base; - return value * base; } return value; diff --git a/scripts/node_xml_file_read/node_xml_file_read.gml b/scripts/node_xml_file_read/node_xml_file_read.gml new file mode 100644 index 000000000..a203d1eb0 --- /dev/null +++ b/scripts/node_xml_file_read/node_xml_file_read.gml @@ -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 +} \ No newline at end of file diff --git a/scripts/node_xml_file_read/node_xml_file_read.yy b/scripts/node_xml_file_read/node_xml_file_read.yy new file mode 100644 index 000000000..69868fbd4 --- /dev/null +++ b/scripts/node_xml_file_read/node_xml_file_read.yy @@ -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", +} \ No newline at end of file diff --git a/scripts/node_xml_file_write/node_xml_file_write.gml b/scripts/node_xml_file_write/node_xml_file_write.gml new file mode 100644 index 000000000..25ff761b7 --- /dev/null +++ b/scripts/node_xml_file_write/node_xml_file_write.gml @@ -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); + } +} \ No newline at end of file diff --git a/scripts/node_xml_file_write/node_xml_file_write.yy b/scripts/node_xml_file_write/node_xml_file_write.yy new file mode 100644 index 000000000..f78e1a6a0 --- /dev/null +++ b/scripts/node_xml_file_write/node_xml_file_write.yy @@ -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", +} \ No newline at end of file diff --git a/scripts/surfaceBox/surfaceBox.gml b/scripts/surfaceBox/surfaceBox.gml index e8ed4226d..5ab8d7372 100644 --- a/scripts/surfaceBox/surfaceBox.gml +++ b/scripts/surfaceBox/surfaceBox.gml @@ -77,17 +77,20 @@ function surfaceBox(_onModify, def_path = "") : widget() constructor { var _arrLen = 0; var _arrInd = 0; - if(is_array(_surface) && array_length(_surface)) { - _arrLen = array_length(_surface); - _arrInd = safe_mod(round(current_time / 250), array_length(_surface)); - _surface = _surface[_arrInd]; + if(is_array(_surface)) { + var _sprd = array_spread(_surface); + + 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)) - _surface = _surface.surface; - - if(is_instanceof(_surface, dynaSurf)) - _surface = array_safe_get_fast(_surface.surfaces, 0, noone); + if(is_instanceof(_surface, __d3dMaterial)) _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(surface_exists(_surface)) { var sfw = surface_get_width(_surface); diff --git a/scripts/svg_objects/svg_objects.gml b/scripts/svg_objects/svg_objects.gml new file mode 100644 index 000000000..4af0dcdef --- /dev/null +++ b/scripts/svg_objects/svg_objects.gml @@ -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++; + } + } +} \ No newline at end of file diff --git a/scripts/svg_objects/svg_objects.yy b/scripts/svg_objects/svg_objects.yy new file mode 100644 index 000000000..affb59149 --- /dev/null +++ b/scripts/svg_objects/svg_objects.yy @@ -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", +} \ No newline at end of file diff --git a/scripts/svg_reader/svg_reader.gml b/scripts/svg_reader/svg_reader.gml new file mode 100644 index 000000000..14053e845 --- /dev/null +++ b/scripts/svg_reader/svg_reader.gml @@ -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; +} \ No newline at end of file diff --git a/scripts/svg_reader/svg_reader.yy b/scripts/svg_reader/svg_reader.yy new file mode 100644 index 000000000..78ae2b506 --- /dev/null +++ b/scripts/svg_reader/svg_reader.yy @@ -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", +} \ No newline at end of file diff --git a/scripts/textBox/textBox.gml b/scripts/textBox/textBox.gml index eba04bc82..734a60cf4 100644 --- a/scripts/textBox/textBox.gml +++ b/scripts/textBox/textBox.gml @@ -168,25 +168,25 @@ function textBox(_input, _onModify) : textInput(_input, _onModify) constructor { } #endregion static apply = function(release = false) { #region - var _input_text_current = _input_text; + var _val = _input_text; disp_x_to = 0; if(input == TEXTBOX_INPUT.number) - _input_text_current = evaluateFunction(_input_text); + _val = evaluateFunction(_input_text); - if(no_empty && _input_text_current == "") - _input_text_current = _last_text; - current_value = _input_text_current; + if(no_empty && _val == "") + _val = _last_text; + current_value = _val; if(release) { if(is_callable(onRelease)) { - var _modi = onRelease(_input_text_current); + var _modi = onRelease(_val); if(_modi && IS_PATREON) shake_amount = PREFERENCES.textbox_shake / 4; return _modi; } } else { if(is_callable(onModify)) { - var _modi = onModify(_input_text_current); + var _modi = onModify(_val); if(_modi && IS_PATREON) shake_amount = PREFERENCES.textbox_shake / 4; return _modi; } diff --git a/sprites/s_node_xml_file_read/cb510786-6e97-4d8d-86c2-22f82318c4c0.png b/sprites/s_node_xml_file_read/cb510786-6e97-4d8d-86c2-22f82318c4c0.png new file mode 100644 index 0000000000000000000000000000000000000000..561a8d015c3434368e4927414043cee117fd9efb GIT binary patch literal 1801 zcmZ{lXEfYd7{>1)qnBNFW%Lksl#ww8F~M4Wh#JF?AfoJy5;jT@!|X2q01$u%;L}Y2aH#+Y`erm+YCsA2EfYgM zaQ4s0X)S&Nz_}B=-cQy+lk2p%<^r|?Q9p9k>Noz>P-OJVpkc;>UY|n{o~$F$M%&&W z4ZUm=SkISX3I~>7!T0=>GKL^U`M{byOeHHs=e0-{7_oCE5IT^Yfzv3L8cJ%Wn|q*p zVDe0+-K)8&wN}3mSw4fB%NqlkHLjRmdz+>yX0(;z^?Oo7+*rY$#ekf8T&I+F_oxn|j92j@&PJ!SLRNT%ver0%`u7!e1%3y{fJ;gN0IwdtV?K!mo-dhyuhqr!fHjA_dxTn*`mIo^?ZM%TEklq za~vJ8`J~RlO1KWMFWg4%zT!f5b>D%3)twH3s@G*BYn@RilubuR$Bo(cY`N?=r6!8% zxlse8)^Ws|M{mH5rJl6ep+h}M#*)(|zO>Yy{$T1?Pm0LlM`Yabep-N~B!efyW|20U zj@#&3d}F5iRQgG;7}tj|$%Oeonsx>Z{G1-x$#SyvpuQ~yxcd%v$M!Hbsgbdg_R2@l zJ?8@2&hvdHG$rhSTw3Grfp6tg6q#LVJkB|4ylhG~Hd)Ca_D$GP9SL~pj2k%1jYwj8 zMtXvErEJf*9Gd*ow#xs~w>K6}@Vk-vw7^aXh(zR2*(56iO<1X&eA@Am8;MLg+6U#0 zDSDEBzFac9V2kKWl;LH;O-?%8|C5)cg!4sqN*wRq^*s0f@9Byo+75UoWYWp6z%X3h zOke+jU5dD|JBNU7LNvQ##uXoxa-Q~K0NnE};gwEmp0}|MY@&zTkEdKNrE2)3Y8iS3 zElGi!hwabFQ|aJl;TV_}qfXVF1`_R)iA3V?iA`(pwNWiCC+Xh|B^s(;ey%AX@3b|+ zDj6~HUKD+$_=C-zvOo?FAc4jHj;y$tWKI(*p)|@+MA9;xU4t|zH&)$+H8yR0`6|4LG(xMu-#uY_ohyPp7?-AMgHx6LPIfi{u>OOE*638Qt9sN zD8ni%r)<-ZUCJ4kithBm-qX~`8_$tl2=N$z{`#e$$mcXLyi4G%iG4CAPbd5aRA2T( zYnT~Q1&=l#=|8+W$d{IZKa&Y!(W+v@?;YBJcc;d1$O4;-LYYKF8lWzGER5$;29BE{ z7ab%O*nz|kmuk00&H1H*BR>0&#-kJp`BzV-pVW;^cs=I;=z&>-=wYM0^J5@ZE7g?Q zVsVF%tP0$QJn;RA>s171i%}jAAT0{3eoz>jSiBOiC_WD3qoC=s;S;4%t6+DKZtD!? z{K<8R&?DkYy_2!j?dpdz)=%GO;Z}vqk78YuSTo>{N34hf3)5pWGn)7A7MbKXi$q2m zD0dKH7K?io#d6&&moXZ*FH5g$yz7-^($URNzi8V&lPy-(h81EA)8+OIWrdS&^{E2N zig5YEgf7HkBMT9+3}c0si-2%qg2kc7gazb>wJSFGupE%C~a%F zw=d<+A~zm!9PvS{JEj5OM;1NV;JXq_+o;f;#U^9G;3elWh9k;P7e%cRbf7}?e+oDN|3gA0$QQ85X zZTgKq94rbQJh)ZBy4;TNwHLIc80R~&)&cLH7I`NXR8gp>1)qnBNFW%Lksl#ww8F~M4Wh#JF?AfoJy5;jT@!|X2q01$u%;L}Y2aH#+Y`erm+YCsA2EfYgM zaQ4s0X)S&Nz_}B=-cQy+lk2p%<^r|?Q9p9k>Noz>P-OJVpkc;>UY|n{o~$F$M%&&W z4ZUm=SkISX3I~>7!T0=>GKL^U`M{byOeHHs=e0-{7_oCE5IT^Yfzv3L8cJ%Wn|q*p zVDe0+-K)8&wN}3mSw4fB%NqlkHLjRmdz+>yX0(;z^?Oo7+*rY$#ekf8T&I+F_oxn|j92j@&PJ!SLRNT%ver0%`u7!e1%3y{fJ;gN0IwdtV?K!mo-dhyuhqr!fHjA_dxTn*`mIo^?ZM%TEklq za~vJ8`J~RlO1KWMFWg4%zT!f5b>D%3)twH3s@G*BYn@RilubuR$Bo(cY`N?=r6!8% zxlse8)^Ws|M{mH5rJl6ep+h}M#*)(|zO>Yy{$T1?Pm0LlM`Yabep-N~B!efyW|20U zj@#&3d}F5iRQgG;7}tj|$%Oeonsx>Z{G1-x$#SyvpuQ~yxcd%v$M!Hbsgbdg_R2@l zJ?8@2&hvdHG$rhSTw3Grfp6tg6q#LVJkB|4ylhG~Hd)Ca_D$GP9SL~pj2k%1jYwj8 zMtXvErEJf*9Gd*ow#xs~w>K6}@Vk-vw7^aXh(zR2*(56iO<1X&eA@Am8;MLg+6U#0 zDSDEBzFac9V2kKWl;LH;O-?%8|C5)cg!4sqN*wRq^*s0f@9Byo+75UoWYWp6z%X3h zOke+jU5dD|JBNU7LNvQ##uXoxa-Q~K0NnE};gwEmp0}|MY@&zTkEdKNrE2)3Y8iS3 zElGi!hwabFQ|aJl;TV_}qfXVF1`_R)iA3V?iA`(pwNWiCC+Xh|B^s(;ey%AX@3b|+ zDj6~HUKD+$_=C-zvOo?FAc4jHj;y$tWKI(*p)|@+MA9;xU4t|zH&)$+H8yR0`6|4LG(xMu-#uY_ohyPp7?-AMgHx6LPIfi{u>OOE*638Qt9sN zD8ni%r)<-ZUCJ4kithBm-qX~`8_$tl2=N$z{`#e$$mcXLyi4G%iG4CAPbd5aRA2T( zYnT~Q1&=l#=|8+W$d{IZKa&Y!(W+v@?;YBJcc;d1$O4;-LYYKF8lWzGER5$;29BE{ z7ab%O*nz|kmuk00&H1H*BR>0&#-kJp`BzV-pVW;^cs=I;=z&>-=wYM0^J5@ZE7g?Q zVsVF%tP0$QJn;RA>s171i%}jAAT0{3eoz>jSiBOiC_WD3qoC=s;S;4%t6+DKZtD!? z{K<8R&?DkYy_2!j?dpdz)=%GO;Z}vqk78YuSTo>{N34hf3)5pWGn)7A7MbKXi$q2m zD0dKH7K?io#d6&&moXZ*FH5g$yz7-^($URNzi8V&lPy-(h81EA)8+OIWrdS&^{E2N zig5YEgf7HkBMT9+3}c0si-2%qg2kc7gazb>wJSFGupE%C~a%F zw=d<+A~zm!9PvS{JEj5OM;1NV;JXq_+o;f;#U^9G;3elWh9k;P7e%cRbf7}?e+oDN|3gA0$QQ85X zZTgKq94rbQJh)ZBy4;TNwHLIc80R~&)&cLH7I`NXR8gp>":"", + "Keyframes":[], + "resourceType":"KeyframeStore", + "resourceVersion":"2.0", + }, + "eventStubScript":null, + "eventToFunction":{}, + "length":1.0, + "lockOrigin":false, + "moments":{ + "$KeyframeStore":"", + "Keyframes":[], + "resourceType":"KeyframeStore", + "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":"","Keyframes":[ + {"$Keyframe":"","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","resourceVersion":"2.0","Stretch":false,}, + ],"resourceType":"KeyframeStore","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, +} \ No newline at end of file diff --git a/sprites/s_node_xml_file_write/418adc75-06fe-4a3d-970c-822dcda18fe2.png b/sprites/s_node_xml_file_write/418adc75-06fe-4a3d-970c-822dcda18fe2.png new file mode 100644 index 0000000000000000000000000000000000000000..ab36187e4d654d9fb17f9068ad24a0e34ce4b5a9 GIT binary patch literal 1757 zcmZ{kc{JN;7snqVsMb(T%b})r(onxq%UDK)D4`4n)z~S=7HcTYcqfguv>NS{C{?Cj z#uinQkjgan>eNz=DqfP9jJ0ZiONa4h{+V;$Kjz%~-0wN}p3nI{=Q+>0w>;dPoiryFjc{i#Hvn$v0YJ_M;Ip_zUIHK$0$?Qs04o{*%83L+jPW_ZDH8V?Y;WlWZeWG_xT3dQ(#V&c=gAJ`^AKF4?1a2 z0xqbbg~^>Z-`S?qiaVG0KA-Rp0W=vlCvDhD6Mh@u{*6I#!M$JGGYAonis8AZPa-6G zl6x_M8QNaX$16Q40><@x8;IxO*{eZ@$)Q|fjzdP*cb96UYRY5Jo^ zoZ=SCsj-Rfyo=xACC#R^XT}TDkLT;Q_V_iQq$u(NQMpsqjjMi+mx7RlsH&huzwUT0QOGmv0wa)q}b{>81;~S^fNzu0P$#tVLfE-@-4UbXuz;m3Q8&lH!`1F2ItP>VISJTrnc0UmzEEG3Ac4@_4)`nO2>Z{FueK7>W7A zuO2m?pQtonDfh{YgbF3^oZO2)bLiPhLlC^?10IJ;@wKa$Gy=U;t z!bf9;ll_xL`WF9b(;1DBYxDX#3t<@M-2ZZv7awaV!Ph!eo~+2)?6rNoezn>|G|~(o zROn2Jy=h;aKe|ZD6-|_EJSaanlGYy>kfEN@;y{XgF5$qX+CvICuh3D}5mh(%H@$`#*q?a4kAANS{C{?Cj z#uinQkjgan>eNz=DqfP9jJ0ZiONa4h{+V;$Kjz%~-0wN}p3nI{=Q+>0w>;dPoiryFjc{i#Hvn$v0YJ_M;Ip_zUIHK$0$?Qs04o{*%83L+jPW_ZDH8V?Y;WlWZeWG_xT3dQ(#V&c=gAJ`^AKF4?1a2 z0xqbbg~^>Z-`S?qiaVG0KA-Rp0W=vlCvDhD6Mh@u{*6I#!M$JGGYAonis8AZPa-6G zl6x_M8QNaX$16Q40><@x8;IxO*{eZ@$)Q|fjzdP*cb96UYRY5Jo^ zoZ=SCsj-Rfyo=xACC#R^XT}TDkLT;Q_V_iQq$u(NQMpsqjjMi+mx7RlsH&huzwUT0QOGmv0wa)q}b{>81;~S^fNzu0P$#tVLfE-@-4UbXuz;m3Q8&lH!`1F2ItP>VISJTrnc0UmzEEG3Ac4@_4)`nO2>Z{FueK7>W7A zuO2m?pQtonDfh{YgbF3^oZO2)bLiPhLlC^?10IJ;@wKa$Gy=U;t z!bf9;ll_xL`WF9b(;1DBYxDX#3t<@M-2ZZv7awaV!Ph!eo~+2)?6rNoezn>|G|~(o zROn2Jy=h;aKe|ZD6-|_EJSaanlGYy>kfEN@;y{XgF5$qX+CvICuh3D}5mh(%H@$`#*q?a4kAA":"", + "Keyframes":[], + "resourceType":"KeyframeStore", + "resourceVersion":"2.0", + }, + "eventStubScript":null, + "eventToFunction":{}, + "length":1.0, + "lockOrigin":false, + "moments":{ + "$KeyframeStore":"", + "Keyframes":[], + "resourceType":"KeyframeStore", + "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":"","Keyframes":[ + {"$Keyframe":"","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","resourceVersion":"2.0","Stretch":false,}, + ],"resourceType":"KeyframeStore","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, +} \ No newline at end of file