From 1b22fb0233b579f6287fcc60ba5685314e5c7f73 Mon Sep 17 00:00:00 2001 From: Tanasart <22589759+Ttanasart-pt@users.noreply.github.com> Date: Mon, 13 Mar 2023 16:45:56 +0700 Subject: [PATCH] 1.13.8 release --- PixelComposer.resource_order | 5 + PixelComposer.yyp | 7 + datafiles/data/layouts.zip | Bin 762 -> 1341 bytes datafiles/data/layouts/Horizontal.json | 66 +++++----- datafiles/data/layouts/Preview.json | 35 +++++ datafiles/data/layouts/Side menu.json | 41 ++++++ datafiles/data/layouts/Vertical.json | 66 +++++----- objects/o_dialog_menubox/Draw_64.gml | 2 +- objects/o_main/Draw_75.gml | 6 +- objects/o_main/Other_2.gml | 4 +- objects/o_main/Step_0.gml | 12 +- scripts/array_functions/array_functions.gml | 3 + scripts/fontScrollBox/fontScrollBox.gml | 2 +- scripts/luaHighlight/luaHighlight.gml | 3 +- .../node_VFX_override/node_VFX_override.gml | 7 + scripts/node_VFX_spawner/node_VFX_spawner.gml | 16 ++- .../node_VFX_variable/node_VFX_variable.gml | 58 +++++---- scripts/node_array_add/node_array_add.gml | 4 + scripts/node_array_shift/node_array_shift.gml | 2 +- scripts/node_array_sort/node_array_sort.gml | 5 + scripts/node_array_zip/node_array_zip.gml | 99 +++++++++++++++ scripts/node_array_zip/node_array_zip.yy | 11 ++ scripts/node_array_zip/node_counter.yy | 12 ++ scripts/node_canvas/node_canvas.gml | 43 ++++--- scripts/node_collection/node_collection.gml | 5 - scripts/node_condition/node_condition.gml | 7 +- scripts/node_data/node_data.gml | 2 +- scripts/node_frame/node_frame.gml | 2 +- scripts/node_gradient/node_gradient.gml | 1 + .../node_gradient_output.gml | 2 + .../node_iterate_each/node_iterate_each.gml | 1 + scripts/node_lua_surface/node_lua_surface.gml | 2 +- scripts/node_path/node_path.gml | 5 +- scripts/node_pin/node_pin.gml | 12 +- scripts/node_registry/node_registry.gml | 5 +- scripts/node_rigid_sim/node_rigid_sim.gml | 23 ++-- .../node_simple_shape/node_simple_shape.gml | 12 +- .../node_sprite_sheet/node_sprite_sheet.gml | 6 +- .../node_string_length/node_string_length.gml | 29 +++++ .../node_string_length/node_string_length.yy | 11 ++ .../node_string_split/node_string_split.gml | 1 + scripts/node_string_trim/node_string_trim.gml | 57 ++++++++- scripts/node_text/node_text.gml | 8 +- scripts/node_value/node_value.gml | 11 +- scripts/panel_animation/panel_animation.gml | 8 +- scripts/panel_collection/panel_collection.gml | 2 + scripts/panel_data/panel_data.gml | 98 +++++++------- scripts/panel_function/panel_function.gml | 59 +++------ scripts/panel_graph/panel_graph.gml | 14 +- scripts/panel_inspector/panel_inspector.gml | 20 ++- scripts/panel_menu/panel_menu.gml | 23 ++-- scripts/panel_nodes/panel_nodes.gml | 120 ++++++++++++++++++ scripts/panel_nodes/panel_nodes.yy | 11 ++ scripts/panel_preview/panel_preview.gml | 25 +++- scripts/panel_tunnels/panel_tunnels.gml | 6 +- scripts/panel_workspace/panel_workspace.gml | 45 ++++++- scripts/preferences/preferences.gml | 1 - .../surface_functions/surface_functions.gml | 7 +- scripts/textArea/textArea.gml | 6 + shaders/sh_cell_noise/sh_cell_noise.fsh | 2 +- .../sh_cell_noise_crystal.fsh | 12 +- .../sh_cell_noise_edge/sh_cell_noise_edge.fsh | 11 +- .../sh_cell_noise_random.fsh | 2 +- shaders/sh_shape/sh_shape.fsh | 7 +- .../48ee54bd-54d6-4f20-9848-4d25dbef1511.png | Bin 0 -> 1136 bytes .../fa3b4a6e-2119-408a-b47a-d44e1d4ac7ab.png | Bin 0 -> 1136 bytes sprites/s_node_array_zip/s_node_array_zip.yy | 74 +++++++++++ .../6835fcb1-d198-40d6-be02-a700ad634332.png | Bin 0 -> 1067 bytes .../3a81dea0-6b42-4634-a523-7044abdb7446.png | Bin 0 -> 1067 bytes .../s_node_text_length/s_node_text_length.yy | 74 +++++++++++ 70 files changed, 1003 insertions(+), 335 deletions(-) create mode 100644 datafiles/data/layouts/Preview.json create mode 100644 datafiles/data/layouts/Side menu.json create mode 100644 scripts/node_array_zip/node_array_zip.gml create mode 100644 scripts/node_array_zip/node_array_zip.yy create mode 100644 scripts/node_array_zip/node_counter.yy create mode 100644 scripts/node_string_length/node_string_length.gml create mode 100644 scripts/node_string_length/node_string_length.yy create mode 100644 scripts/panel_nodes/panel_nodes.gml create mode 100644 scripts/panel_nodes/panel_nodes.yy create mode 100644 sprites/s_node_array_zip/48ee54bd-54d6-4f20-9848-4d25dbef1511.png create mode 100644 sprites/s_node_array_zip/layers/48ee54bd-54d6-4f20-9848-4d25dbef1511/fa3b4a6e-2119-408a-b47a-d44e1d4ac7ab.png create mode 100644 sprites/s_node_array_zip/s_node_array_zip.yy create mode 100644 sprites/s_node_text_length/6835fcb1-d198-40d6-be02-a700ad634332.png create mode 100644 sprites/s_node_text_length/layers/6835fcb1-d198-40d6-be02-a700ad634332/3a81dea0-6b42-4634-a523-7044abdb7446.png create mode 100644 sprites/s_node_text_length/s_node_text_length.yy diff --git a/PixelComposer.resource_order b/PixelComposer.resource_order index 201f57951..8434ce394 100644 --- a/PixelComposer.resource_order +++ b/PixelComposer.resource_order @@ -454,6 +454,7 @@ {"name":"node_cache","order":9,"path":"scripts/node_cache/node_cache.yy",}, {"name":"sh_bw","order":5,"path":"shaders/sh_bw/sh_bw.yy",}, {"name":"real_comparison","order":1,"path":"scripts/real_comparison/real_comparison.yy",}, + {"name":"node_array_zip","order":25,"path":"scripts/node_array_zip/node_array_zip.yy",}, {"name":"fd_rectangle_get_collision_mask_sprite_image","order":5,"path":"scripts/fd_rectangle_get_collision_mask_sprite_image/fd_rectangle_get_collision_mask_sprite_image.yy",}, {"name":"s_node_stripe","order":16,"path":"sprites/s_node_stripe/s_node_stripe.yy",}, {"name":"s_node_lua_global","order":19,"path":"sprites/s_node_lua_global/s_node_lua_global.yy",}, @@ -769,6 +770,7 @@ {"name":"s_node_blur_directional","order":9,"path":"sprites/s_node_blur_directional/s_node_blur_directional.yy",}, {"name":"s_node_average","order":48,"path":"sprites/s_node_average/s_node_average.yy",}, {"name":"s_node_sprite_sheet","order":1,"path":"sprites/s_node_sprite_sheet/s_node_sprite_sheet.yy",}, + {"name":"s_node_text_length","order":9,"path":"sprites/s_node_text_length/s_node_text_length.yy",}, {"name":"s_node_grid_hex","order":4,"path":"sprites/s_node_grid_hex/s_node_grid_hex.yy",}, {"name":"sh_fd_visualize_colorize_glsl","order":13,"path":"shaders/sh_fd_visualize_colorize_glsl/sh_fd_visualize_colorize_glsl.yy",}, {"name":"o_dialog_preview_window","order":1,"path":"objects/o_dialog_preview_window/o_dialog_preview_window.yy",}, @@ -841,6 +843,7 @@ {"name":"mouse_input","order":1,"path":"scripts/mouse_input/mouse_input.yy",}, {"name":"string_cut","order":4,"path":"scripts/string_cut/string_cut.yy",}, {"name":"node_3d_prim_cylinder","order":7,"path":"scripts/node_3d_prim_cylinder/node_3d_prim_cylinder.yy",}, + {"name":"panel_nodes","order":2,"path":"scripts/panel_nodes/panel_nodes.yy",}, {"name":"sh_gradient_points","order":19,"path":"shaders/sh_gradient_points/sh_gradient_points.yy",}, {"name":"s_node_vfx_turb","order":5,"path":"sprites/s_node_vfx_turb/s_node_vfx_turb.yy",}, {"name":"o_dialog_l_system","order":1,"path":"objects/o_dialog_l_system/o_dialog_l_system.yy",}, @@ -882,6 +885,7 @@ {"name":"node_gradient_extract","order":13,"path":"scripts/node_gradient_extract/node_gradient_extract.yy",}, {"name":"s_node_normal_light","order":29,"path":"sprites/s_node_normal_light/s_node_normal_light.yy",}, {"name":"node_transform_single","order":1,"path":"scripts/node_transform_single/node_transform_single.yy",}, + {"name":"node_string_length","order":22,"path":"scripts/node_string_length/node_string_length.yy",}, {"name":"node_fluid_apply_velo","order":5,"path":"scripts/node_fluid_apply_velo/node_fluid_apply_velo.yy",}, {"name":"s_node_path_transform","order":5,"path":"sprites/s_node_path_transform/s_node_path_transform.yy",}, {"name":"s_node_path_blend","order":1,"path":"sprites/s_node_path_blend/s_node_path_blend.yy",}, @@ -1059,6 +1063,7 @@ {"name":"sh_fd_visualize_pixel_art_fiery_smoke_glsl","order":14,"path":"shaders/sh_fd_visualize_pixel_art_fiery_smoke_glsl/sh_fd_visualize_pixel_art_fiery_smoke_glsl.yy",}, {"name":"node_ase_layer","order":15,"path":"scripts/node_ase_layer/node_ase_layer.yy",}, {"name":"sh_local_analyze","order":47,"path":"shaders/sh_local_analyze/sh_local_analyze.yy",}, + {"name":"s_node_array_zip","order":13,"path":"sprites/s_node_array_zip/s_node_array_zip.yy",}, {"name":"fd_rectangle_get_material_width","order":15,"path":"scripts/fd_rectangle_get_material_width/fd_rectangle_get_material_width.yy",}, {"name":"font_sprite_loader","order":10,"path":"scripts/font_sprite_loader/font_sprite_loader.yy",}, {"name":"s_node_noise_aniso","order":9,"path":"sprites/s_node_noise_aniso/s_node_noise_aniso.yy",}, diff --git a/PixelComposer.yyp b/PixelComposer.yyp index 591afb499..d92c80c13 100644 --- a/PixelComposer.yyp +++ b/PixelComposer.yyp @@ -163,6 +163,8 @@ {"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"icon.png","CopyToMask":-1,"filePath":"datafiles/data",}, {"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"layouts.zip","CopyToMask":-1,"filePath":"datafiles/data",}, {"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"Horizontal.json","CopyToMask":-1,"filePath":"datafiles/data/layouts",}, + {"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"Preview.json","CopyToMask":-1,"filePath":"datafiles/data/layouts",}, + {"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"Side menu.json","CopyToMask":-1,"filePath":"datafiles/data/layouts",}, {"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"Vertical.json","CopyToMask":-1,"filePath":"datafiles/data/layouts",}, {"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"en.json","CopyToMask":-1,"filePath":"datafiles/data/locale",}, {"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"storepage_533260_english.json","CopyToMask":-1,"filePath":"datafiles/data/locale",}, @@ -880,6 +882,7 @@ {"id":{"name":"sh_bw","path":"shaders/sh_bw/sh_bw.yy",},}, {"id":{"name":"real_comparison","path":"scripts/real_comparison/real_comparison.yy",},}, {"id":{"name":"sh_sdf_tex","path":"shaders/sh_sdf_tex/sh_sdf_tex.yy",},}, + {"id":{"name":"node_array_zip","path":"scripts/node_array_zip/node_array_zip.yy",},}, {"id":{"name":"fd_rectangle_get_collision_mask_sprite_image","path":"scripts/fd_rectangle_get_collision_mask_sprite_image/fd_rectangle_get_collision_mask_sprite_image.yy",},}, {"id":{"name":"s_node_stripe","path":"sprites/s_node_stripe/s_node_stripe.yy",},}, {"id":{"name":"s_node_lua_global","path":"sprites/s_node_lua_global/s_node_lua_global.yy",},}, @@ -1231,6 +1234,7 @@ {"id":{"name":"distance_to_line","path":"scripts/distance_to_line/distance_to_line.yy",},}, {"id":{"name":"s_node_average","path":"sprites/s_node_average/s_node_average.yy",},}, {"id":{"name":"s_node_sprite_sheet","path":"sprites/s_node_sprite_sheet/s_node_sprite_sheet.yy",},}, + {"id":{"name":"s_node_text_length","path":"sprites/s_node_text_length/s_node_text_length.yy",},}, {"id":{"name":"s_node_grid_hex","path":"sprites/s_node_grid_hex/s_node_grid_hex.yy",},}, {"id":{"name":"sh_fd_visualize_colorize_glsl","path":"shaders/sh_fd_visualize_colorize_glsl/sh_fd_visualize_colorize_glsl.yy",},}, {"id":{"name":"s_node_3d_cube","path":"sprites/s_node_3d_cube/s_node_3d_cube.yy",},}, @@ -1317,6 +1321,7 @@ {"id":{"name":"mouse_input","path":"scripts/mouse_input/mouse_input.yy",},}, {"id":{"name":"string_cut","path":"scripts/string_cut/string_cut.yy",},}, {"id":{"name":"node_3d_prim_cylinder","path":"scripts/node_3d_prim_cylinder/node_3d_prim_cylinder.yy",},}, + {"id":{"name":"panel_nodes","path":"scripts/panel_nodes/panel_nodes.yy",},}, {"id":{"name":"sh_gradient_points","path":"shaders/sh_gradient_points/sh_gradient_points.yy",},}, {"id":{"name":"s_node_vfx_turb","path":"sprites/s_node_vfx_turb/s_node_vfx_turb.yy",},}, {"id":{"name":"o_dialog_l_system","path":"objects/o_dialog_l_system/o_dialog_l_system.yy",},}, @@ -1367,6 +1372,7 @@ {"id":{"name":"node_gradient_extract","path":"scripts/node_gradient_extract/node_gradient_extract.yy",},}, {"id":{"name":"s_node_normal_light","path":"sprites/s_node_normal_light/s_node_normal_light.yy",},}, {"id":{"name":"node_transform_single","path":"scripts/node_transform_single/node_transform_single.yy",},}, + {"id":{"name":"node_string_length","path":"scripts/node_string_length/node_string_length.yy",},}, {"id":{"name":"node_fluid_apply_velo","path":"scripts/node_fluid_apply_velo/node_fluid_apply_velo.yy",},}, {"id":{"name":"s_node_path_transform","path":"sprites/s_node_path_transform/s_node_path_transform.yy",},}, {"id":{"name":"s_node_sdf","path":"sprites/s_node_sdf/s_node_sdf.yy",},}, @@ -1573,6 +1579,7 @@ {"id":{"name":"sh_fd_visualize_pixel_art_fiery_smoke_glsl","path":"shaders/sh_fd_visualize_pixel_art_fiery_smoke_glsl/sh_fd_visualize_pixel_art_fiery_smoke_glsl.yy",},}, {"id":{"name":"node_ase_layer","path":"scripts/node_ase_layer/node_ase_layer.yy",},}, {"id":{"name":"sh_local_analyze","path":"shaders/sh_local_analyze/sh_local_analyze.yy",},}, + {"id":{"name":"s_node_array_zip","path":"sprites/s_node_array_zip/s_node_array_zip.yy",},}, {"id":{"name":"fd_rectangle_get_material_width","path":"scripts/fd_rectangle_get_material_width/fd_rectangle_get_material_width.yy",},}, {"id":{"name":"font_sprite_loader","path":"scripts/font_sprite_loader/font_sprite_loader.yy",},}, {"id":{"name":"s_node_noise_aniso","path":"sprites/s_node_noise_aniso/s_node_noise_aniso.yy",},}, diff --git a/datafiles/data/layouts.zip b/datafiles/data/layouts.zip index 432ddd40a2c86eb47ea077c31be093e1a08ae820..1ec7ca997a454d7ecce7791117ae2da438c30ff9 100644 GIT binary patch literal 1341 zcmWIWW@Zs#U|`^2sEW!7~JV4y1DuEAvZBiuFD6i!!V7^GXtP^sACutyvuMI@9LN51%wEoJpkDO~`F>5EsMCp6|YAwL_gWR$UD| zu$J|%iPDnJkfvokueLQTy0Yoal_J$QRR(jrcno}t^}TdX97qjY!^gK>T>ME&6R&3Q zp`}Y~jF+k~uQ+n!07EcqUU<^33x@i}<{MRv?fJX4H}0Cy@cMz?Wz&rgQ;)vWQc~i& zeDUE=*PBOKJ5R2>A>-Th-1c)9chF?-Pu(ltRtj&4IB39=7{Ip6(L=FAW~YYRg97%p zzgzdjY-I?5`@aO}f6=Mct>=OM-VXFXC{$qn4=744%S$k3c0CyrQje~8|=&7P9& zm;X`y`7`Hlnu^Z4eQvh-p6_nOmp7bpVloz5ICpCO{ZRb}K0<1z-z~j9uYsZG&-q8U zJ2!|+@ri9S?cSCCrBn4O&!_cf0#iFW!j6bIYAi07oOa<`jj=bj&L9tP|W?o8R=VyyWl)7b7K(z$Edb95U|? zY}h|-`f4#?x?p4y0cQg2MFTJh7#JB8Kok(bG74Hjfour2`~}hqHG~mi2y$*iHUV1# uMVP?IgfIa$xgwi^Eh-UaNCP7m<`tBP4e(}V11VzxLO!5VC4u>afdK$Rx8`vG delta 652 zcmdnX^@~*^z?+#xgn@y9gW*YHcG%{sH+(;UJU-Tm60-G6ryS&Jau8^H-}GLf*zALX z;N3;eB^-O)TV6DAZ`0eAsj#m)d*w>&b<$^Z)9cdq-9NZ8CtH=d;(!O!?$EE5`-?68 zS4^?hM5`Iqq28NVu1d&8KV__pVM#Qb@hZ0wrlIoan+ zH}0CZY5K!+qBqNL)rYAYOW!(uw(a{T*3(`8%xCFcVf`hksiApr&GC}$#UI5l8FE+T zaBb1q{Yuq)8qb;)V&8i1F*^otOK@(sZ?!OiaG9g z&vn=&=;ZAA7GF7rI)SR3p8hTKD2 z_cF7-cj4+vnrF;Bk1e~&IG|*z+#2b^6PtZ{GS(;jk-gX Drawing: " + str); var tx = _x var ty = _y; @@ -48,7 +49,7 @@ function draw_code(_x, _y, str) { for( var i = 0; i < amo; i++ ) { var _w = strSpl[i]; - _w = string_trim_end(_w); + _w = string_replace_all(_w, "\n", ""); isStr = !isStr; diff --git a/scripts/node_VFX_override/node_VFX_override.gml b/scripts/node_VFX_override/node_VFX_override.gml index 7bab962c7..30c920404 100644 --- a/scripts/node_VFX_override/node_VFX_override.gml +++ b/scripts/node_VFX_override/node_VFX_override.gml @@ -24,6 +24,9 @@ function Node_VFX_Override(_x, _y, _group = noone) : Node(_x, _y, _group) constr inputs[| 5] = nodeValue("Alpha", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0 ); + inputs[| 6] = nodeValue("Surface", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone ) + .setVisible(true, false); + outputs[| 0] = nodeValue("Particles", self, JUNCTION_CONNECT.output, VALUE_TYPE.particle, -1 ); static update = function(frame = ANIMATOR.current_frame) { @@ -35,6 +38,7 @@ function Node_VFX_Override(_x, _y, _group = noone) : Node(_x, _y, _group) constr var _rot = inputs[| 3].getValue(); var _col = inputs[| 4].getValue(); var _alp = inputs[| 5].getValue(); + var _srf = inputs[| 6].getValue(); for( var i = 0; i < array_length(parts); i++ ) { var part = parts[i]; @@ -57,6 +61,9 @@ function Node_VFX_Override(_x, _y, _group = noone) : Node(_x, _y, _group) constr if(is_array(_alp) && array_length(_alp) > i ) part.alp = array_safe_get(_alp, i); + + if(is_array(_srf) && array_length(_srf) > i ) + part.surf = array_safe_get(_srf, i); } outputs[| 0].setValue(parts); diff --git a/scripts/node_VFX_spawner/node_VFX_spawner.gml b/scripts/node_VFX_spawner/node_VFX_spawner.gml index a36e65502..938a031a9 100644 --- a/scripts/node_VFX_spawner/node_VFX_spawner.gml +++ b/scripts/node_VFX_spawner/node_VFX_spawner.gml @@ -3,12 +3,14 @@ function Node_VFX_Spawner(_x, _y, _group = noone) : Node_VFX_Spawner_Base(_x, _y color = COLORS.node_blend_vfx; icon = THEME.vfx; + attributes[? "Output pool"] = false; + inputs[| input_len + 0] = nodeValue("Spawn trigger", self, JUNCTION_CONNECT.input, VALUE_TYPE.node, false) .setVisible(true, true); inputs[| input_len + 1] = nodeValue("Step interval", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 1, "How often the 'on step' event is triggered.\nWith 1 being trigger every frame, 2 means triggered once every 2 frames."); - outputs[| 0] = nodeValue("Particles", self, JUNCTION_CONNECT.output, VALUE_TYPE.particle, parts ); + outputs[| 0] = nodeValue("Particles", self, JUNCTION_CONNECT.output, VALUE_TYPE.particle, [] ); outputs[| 1] = nodeValue("On create", self, JUNCTION_CONNECT.output, VALUE_TYPE.node, noone ); outputs[| 2] = nodeValue("On step", self, JUNCTION_CONNECT.output, VALUE_TYPE.node, noone ); outputs[| 3] = nodeValue("On destroy", self, JUNCTION_CONNECT.output, VALUE_TYPE.node, noone ); @@ -32,6 +34,18 @@ function Node_VFX_Spawner(_x, _y, _group = noone) : Node_VFX_Spawner_Base(_x, _y if(ANIMATOR.current_frame == 0) reset(); runVFX(ANIMATOR.current_frame); + + if(attributes[? "Output pool"]) { + outputs[| 0].setValue(parts); + return; + } else { + var _parts = []; + for( var i = 0; i < array_length(parts); i++ ) { + if(!parts[i].active) continue; + array_push(_parts, parts[i]); + } + outputs[| 0].setValue(_parts); + } } static onSpawn = function(_time, part) { diff --git a/scripts/node_VFX_variable/node_VFX_variable.gml b/scripts/node_VFX_variable/node_VFX_variable.gml index cb76aa412..94b28d6e9 100644 --- a/scripts/node_VFX_variable/node_VFX_variable.gml +++ b/scripts/node_VFX_variable/node_VFX_variable.gml @@ -15,52 +15,60 @@ function Node_VFX_Variable(_x, _y, _group = noone) : Node(_x, _y, _group) constr input_display_list = [ 0 ]; outputs[| 0] = nodeValue("Positions", self, JUNCTION_CONNECT.output, VALUE_TYPE.float, [] ) - .setDisplay(VALUE_DISPLAY.vector); + .setDisplay(VALUE_DISPLAY.vector) + .setVisible(false); outputs[| 1] = nodeValue("Scales", self, JUNCTION_CONNECT.output, VALUE_TYPE.float, [] ) - .setDisplay(VALUE_DISPLAY.vector); + .setDisplay(VALUE_DISPLAY.vector) + .setVisible(false); - outputs[| 2] = nodeValue("Rotations", self, JUNCTION_CONNECT.output, VALUE_TYPE.float, 0 ); + outputs[| 2] = nodeValue("Rotations", self, JUNCTION_CONNECT.output, VALUE_TYPE.float, 0 ) + .setVisible(false); - outputs[| 3] = nodeValue("Blending", self, JUNCTION_CONNECT.output, VALUE_TYPE.color, 0 ); + outputs[| 3] = nodeValue("Blending", self, JUNCTION_CONNECT.output, VALUE_TYPE.color, 0 ) + .setVisible(false); - outputs[| 4] = nodeValue("Alpha", self, JUNCTION_CONNECT.output, VALUE_TYPE.float, 0 ); + outputs[| 4] = nodeValue("Alpha", self, JUNCTION_CONNECT.output, VALUE_TYPE.float, 0 ) + .setVisible(false); - outputs[| 5] = nodeValue("Life", self, JUNCTION_CONNECT.output, VALUE_TYPE.float, 0 ); + outputs[| 5] = nodeValue("Life", self, JUNCTION_CONNECT.output, VALUE_TYPE.float, 0 ) + .setVisible(false); - outputs[| 6] = nodeValue("Max life", self, JUNCTION_CONNECT.output, VALUE_TYPE.float, 0 ); + outputs[| 6] = nodeValue("Max life", self, JUNCTION_CONNECT.output, VALUE_TYPE.float, 0 ) + .setVisible(false); + + outputs[| 7] = nodeValue("Surface", self, JUNCTION_CONNECT.output, VALUE_TYPE.surface, noone ) + .setVisible(false); + + outputs[| 8] = nodeValue("Velocity", self, JUNCTION_CONNECT.output, VALUE_TYPE.float, [] ) + .setDisplay(VALUE_DISPLAY.vector) + .setVisible(false); static update = function(frame = ANIMATOR.current_frame) { var parts = inputs[| 0].getValue(); if(!is_array(parts)) return; - var _get = []; var _val = []; - for( var i = 0; i < ds_list_size(outputs); i++ ) { - _get[i] = false; - var _in = outputs[| i]; - for( var j = 0; j < ds_list_size(_in.value_to); j++ ) - if(_in.value_to[| j].value_from == _in) _get[i] = true; - - _val[i] = []; - if(_get[i]) _val[i] = array_create(array_length(parts)); - } + for( var i = 0; i < ds_list_size(outputs); i++ ) + _val[i] = array_create(array_length(parts)); for( var i = 0; i < array_length(parts); i++ ) { var part = parts[i]; - if(_get[0]) _val[0][i] = [part.x, part.y]; - if(_get[1]) _val[1][i] = [part.scx, part.scy]; - if(_get[2]) _val[2][i] = part.rot; - if(_get[3]) _val[3][i] = part.blend; - if(_get[4]) _val[4][i] = part.alp; - if(_get[5]) _val[5][i] = part.life; - if(_get[6]) _val[6][i] = part.life_total; + if(outputs[| 0].visible) _val[0][i] = [part.x, part.y]; + if(outputs[| 1].visible) _val[1][i] = [part.scx, part.scy]; + if(outputs[| 2].visible) _val[2][i] = part.rot; + if(outputs[| 3].visible) _val[3][i] = part.blend; + if(outputs[| 4].visible) _val[4][i] = part.alp; + if(outputs[| 5].visible) _val[5][i] = part.life; + if(outputs[| 6].visible) _val[6][i] = part.life_total; + if(outputs[| 7].visible) _val[7][i] = part.surf; + if(outputs[| 8].visible) _val[8][i] = [part.sx, part.sy]; } for( var i = 0; i < ds_list_size(outputs); i++ ) - if(_get[i]) outputs[| i].setValue(_val[i]); + if(outputs[| i].visible) outputs[| i].setValue(_val[i]); } static onDrawNode = function(xx, yy, _mx, _my, _s, _hover, _focus) { diff --git a/scripts/node_array_add/node_array_add.gml b/scripts/node_array_add/node_array_add.gml index d902d6b09..1fd63ed40 100644 --- a/scripts/node_array_add/node_array_add.gml +++ b/scripts/node_array_add/node_array_add.gml @@ -84,4 +84,8 @@ function Node_Array_Add(_x, _y, _group = noone) : Node(_x, _y, _group) construct createNewInput(); } + static onDrawNode = function(xx, yy, _mx, _my, _s, _hover, _focus) { + var bbox = drawGetBbox(xx, yy, _s); + draw_sprite_fit(s_node_array_add, 0, bbox.xc, bbox.yc, bbox.w, bbox.h); + } } \ No newline at end of file diff --git a/scripts/node_array_shift/node_array_shift.gml b/scripts/node_array_shift/node_array_shift.gml index 4702d8bba..614de3db9 100644 --- a/scripts/node_array_shift/node_array_shift.gml +++ b/scripts/node_array_shift/node_array_shift.gml @@ -37,6 +37,6 @@ function Node_Array_Shift(_x, _y, _group = noone) : Node(_x, _y, _group) constru static onDrawNode = function(xx, yy, _mx, _my, _s, _hover, _focus) { var bbox = drawGetBbox(xx, yy, _s); - draw_sprite_fit(s_node_array_reverse, 0, bbox.xc, bbox.yc, bbox.w, bbox.h); + draw_sprite_fit(s_node_array_shift, 0, bbox.xc, bbox.yc, bbox.w, bbox.h); } } \ No newline at end of file diff --git a/scripts/node_array_sort/node_array_sort.gml b/scripts/node_array_sort/node_array_sort.gml index 96c60807b..814f135a0 100644 --- a/scripts/node_array_sort/node_array_sort.gml +++ b/scripts/node_array_sort/node_array_sort.gml @@ -32,4 +32,9 @@ function Node_Array_Sort(_x, _y, _group = noone) : Node(_x, _y, _group) construc outputs[| 0].setValue(_arr); } + + static onDrawNode = function(xx, yy, _mx, _my, _s, _hover, _focus) { + var bbox = drawGetBbox(xx, yy, _s); + draw_sprite_fit(s_node_array_sort, 0, bbox.xc, bbox.yc, bbox.w, bbox.h); + } } \ No newline at end of file diff --git a/scripts/node_array_zip/node_array_zip.gml b/scripts/node_array_zip/node_array_zip.gml new file mode 100644 index 000000000..51beea012 --- /dev/null +++ b/scripts/node_array_zip/node_array_zip.gml @@ -0,0 +1,99 @@ +function Node_Array_Zip(_x, _y, _group = noone) : Node(_x, _y, _group) constructor { + name = "Array Zip"; + previewable = false; + + w = 96; + h = 32 + 24; + min_h = h; + + inputs[| 0] = nodeValue("Array", self, JUNCTION_CONNECT.input, VALUE_TYPE.any, 0) + .setVisible(true, true); + + outputs[| 0] = nodeValue("Output", self, JUNCTION_CONNECT.output, VALUE_TYPE.integer, 0); + + input_fix_len = ds_list_size(inputs); + data_length = 1; + + static createNewInput = function() { + var index = ds_list_size(inputs); + + inputs[| index] = nodeValue("Value", self, JUNCTION_CONNECT.input, VALUE_TYPE.any, -1 ) + .setVisible(true, true); + + return inputs[| index]; + } + if(!LOADING && !APPENDING) createNewInput(); + + static refreshDynamicInput = function() { + var _l = ds_list_create(); + + for( var i = 0; i < ds_list_size(inputs); i++ ) { + if(i < input_fix_len || inputs[| i].value_from) + ds_list_add(_l, inputs[| i]); + else + delete inputs[| i]; + } + + for( var i = 0; i < ds_list_size(_l); i++ ) + _l[| i].index = i; + + ds_list_destroy(inputs); + inputs = _l; + + createNewInput(); + } + + static onValueFromUpdate = function(index) { + if(LOADING || APPENDING) return; + + refreshDynamicInput(); + } + + static update = function(frame = ANIMATOR.current_frame) { + var _arr = inputs[| 0].getValue(); + + if(inputs[| 0].value_from == noone) { + inputs[| 0].type = VALUE_TYPE.any; + outputs[| 0].type = VALUE_TYPE.any; + return; + } + + if(!is_array(_arr)) return; + var _type = inputs[| 0].value_from.type; + inputs[| 0].type = _type; + outputs[| 0].type = _type; + + var len = 1; + var val = []; + for( var i = 0; i < ds_list_size(inputs) - 1; i += data_length ) { + val[i] = inputs[| i].getValue(); + inputs[| i].type = inputs[| i].value_from == noone? inputs[| i].value_from.type : VALUE_TYPE.any; + if(!is_array(val[i])) { + val[i] = [ val[i] ]; + continue; + } + len = max(len, array_length(val[i])); + } + + var _out = array_create(len); + + for( var i = 0; i < len; i++ ) { + for( var j = 0; j < ds_list_size(inputs) - 1; j += data_length ) + _out[i][j] = array_safe_get(val[j], i, 0); + } + + outputs[| 0].setValue(_out); + } + + static postDeserialize = function() { + var _inputs = load_map[? "inputs"]; + + for(var i = input_fix_len; i < ds_list_size(_inputs); i += data_length ) + createNewInput(); + } + + static onDrawNode = function(xx, yy, _mx, _my, _s, _hover, _focus) { + var bbox = drawGetBbox(xx, yy, _s); + draw_sprite_fit(s_node_array_zip, 0, bbox.xc, bbox.yc, bbox.w, bbox.h); + } +} \ No newline at end of file diff --git a/scripts/node_array_zip/node_array_zip.yy b/scripts/node_array_zip/node_array_zip.yy new file mode 100644 index 000000000..f7862c29e --- /dev/null +++ b/scripts/node_array_zip/node_array_zip.yy @@ -0,0 +1,11 @@ +{ + "resourceType": "GMScript", + "resourceVersion": "1.0", + "name": "node_array_zip", + "isCompatibility": false, + "isDnD": false, + "parent": { + "name": "array", + "path": "folders/nodes/data/value/array.yy", + }, +} \ No newline at end of file diff --git a/scripts/node_array_zip/node_counter.yy b/scripts/node_array_zip/node_counter.yy new file mode 100644 index 000000000..10832a0b0 --- /dev/null +++ b/scripts/node_array_zip/node_counter.yy @@ -0,0 +1,12 @@ +{ + "isDnD": false, + "isCompatibility": false, + "parent": { + "name": "variable", + "path": "folders/nodes/data/variable.yy", + }, + "resourceVersion": "1.0", + "name": "node_counter", + "tags": [], + "resourceType": "GMScript", +} \ No newline at end of file diff --git a/scripts/node_canvas/node_canvas.gml b/scripts/node_canvas/node_canvas.gml index 8aa6e9609..0d8f4ad26 100644 --- a/scripts/node_canvas/node_canvas.gml +++ b/scripts/node_canvas/node_canvas.gml @@ -63,7 +63,7 @@ function Node_Canvas(_x, _y, _group = noone) : Node(_x, _y, _group) constructor draw_stack = ds_list_create(); - function surface_update() { + function surface_store_buffer() { buffer_delete(surface_buffer); surface_w = surface_get_width(canvas_surface); @@ -85,6 +85,8 @@ function Node_Canvas(_x, _y, _group = noone) : Node(_x, _y, _group) constructor draw_clear_alpha(0, 0); surface_reset_target(); BLEND_NORMAL; + + surface_store_buffer(); } function apply_surface() { @@ -273,8 +275,6 @@ function Node_Canvas(_x, _y, _group = noone) : Node(_x, _y, _group) constructor } function flood_fill_scanline(_x, _y, _surf, _thres, _corner = false) { - surface_update(); - var colorFill = draw_get_color() + (255 << 24); var colorBase = get_color_buffer(_x, _y); @@ -360,8 +360,6 @@ function Node_Canvas(_x, _y, _group = noone) : Node(_x, _y, _group) constructor } } } - - surface_update(); } function canvas_fill(_x, _y, _surf, _thres) { @@ -385,8 +383,6 @@ function Node_Canvas(_x, _y, _group = noone) : Node(_x, _y, _group) constructor } } draw_set_alpha(1); - - surface_update(); } mouse_cur_x = 0; @@ -449,7 +445,6 @@ function Node_Canvas(_x, _y, _group = noone) : Node(_x, _y, _group) constructor mouse_holding = false; apply_draw_surface(); - surface_update(); } mouse_pre_draw_x = mouse_cur_x; @@ -472,7 +467,6 @@ function Node_Canvas(_x, _y, _group = noone) : Node(_x, _y, _group) constructor if(mouse_holding && mouse_release(mb_left)) { mouse_holding = false; apply_draw_surface(); - surface_update(); } BLEND_NORMAL; @@ -510,7 +504,6 @@ function Node_Canvas(_x, _y, _group = noone) : Node(_x, _y, _group) constructor BLEND_NORMAL; apply_draw_surface(); - surface_update(); mouse_holding = false; } apply_surface(); @@ -529,7 +522,7 @@ function Node_Canvas(_x, _y, _group = noone) : Node(_x, _y, _group) constructor break; } - surface_update(); + surface_store_buffer(); } } @@ -600,10 +593,11 @@ function Node_Canvas(_x, _y, _group = noone) : Node(_x, _y, _group) constructor static step = function() { var _outSurf = outputs[| 0].getValue(); - if(is_surface(_outSurf)) return; - _outSurf = surface_create_from_buffer(surface_w, surface_h, surface_buffer); - outputs[| 0].setValue(_outSurf); + if(!is_surface(_outSurf)) { + _outSurf = surface_create_from_buffer(surface_w, surface_h, surface_buffer); + outputs[| 0].setValue(_outSurf); + } } static update = function(frame = ANIMATOR.current_frame) { @@ -611,15 +605,24 @@ function Node_Canvas(_x, _y, _group = noone) : Node(_x, _y, _group) constructor } static doSerialize = function(_map) { - _map[? "surface"] = buffer_base64_encode(surface_buffer, 0, buffer_get_size(surface_buffer)); + surface_store_buffer(); + var comp = buffer_compress(surface_buffer, 0, buffer_get_size(surface_buffer)); + var enc = buffer_base64_encode(comp, 0, buffer_get_size(comp)); + + _map[? "surface"] = enc; } - static postDeserialize = function() { - if(!ds_map_exists(load_map, "surface")) return; - surface_buffer = buffer_base64_decode(load_map[? "surface"]); + static doApplyDeserialize = function() { + if(!ds_map_exists(load_map, "surface")) return; + var buff = buffer_base64_decode(load_map[? "surface"]); + surface_buffer = buffer_decompress(buff); - buffer_set_surface(surface_buffer, canvas_surface, 0); - surface_update(); + var _dim = inputs[| 0].getValue(); + var _outSurf = outputs[| 0].getValue(); + _outSurf = surface_verify(_outSurf, _dim[0], _dim[1]); + canvas_surface = surface_create_from_buffer(_dim[0], _dim[1], surface_buffer); + + apply_surface(); } static onCleanUp = function() { diff --git a/scripts/node_collection/node_collection.gml b/scripts/node_collection/node_collection.gml index f99cad4b9..e7355040d 100644 --- a/scripts/node_collection/node_collection.gml +++ b/scripts/node_collection/node_collection.gml @@ -241,11 +241,6 @@ function Node_Collection(_x, _y, _group = noone) : Node(_x, _y, _group) construc render_time += node_list[| i].render_time; } - if(PANEL_GRAPH.node_focus == self && panelFocus(PANEL_GRAPH) && DOUBLE_CLICK) { - PANEL_GRAPH.addContext(self); - DOUBLE_CLICK = false; - } - w = attributes[? "w"]; onStep(); diff --git a/scripts/node_condition/node_condition.gml b/scripts/node_condition/node_condition.gml index 0c9d9fe88..6e98b95bf 100644 --- a/scripts/node_condition/node_condition.gml +++ b/scripts/node_condition/node_condition.gml @@ -4,7 +4,6 @@ function Node_Condition(_x, _y, _group = noone) : Node(_x, _y, _group) construct w = 96; - inputs[| 0] = nodeValue("Check value", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0 ) .setVisible(true, true); @@ -76,10 +75,12 @@ function Node_Condition(_x, _y, _group = noone) : Node(_x, _y, _group) construct if(res) { outputs[| 0].setValue(_true); - outputs[| 0].type = inputs[| 3].type; + outputs[| 0].type = inputs[| 3].type; + outputs[| 0].display_type = inputs[| 3].display_type; } else { outputs[| 0].setValue(_fals); - outputs[| 0].type = inputs[| 4].type; + outputs[| 0].type = inputs[| 4].type; + outputs[| 0].display_type = inputs[| 4].display_type; } outputs[| 1].setValue(res); diff --git a/scripts/node_data/node_data.gml b/scripts/node_data/node_data.gml index c438643ad..b3d6676b8 100644 --- a/scripts/node_data/node_data.gml +++ b/scripts/node_data/node_data.gml @@ -717,7 +717,7 @@ function Node(_x, _y, _group = PANEL_GRAPH.getCurrentContext()) : __Node_Base(_x static drawNode = function(_x, _y, _mx, _my, _s) { if(!active) return; - if(group != PANEL_GRAPH.getCurrentContext()) return; + //if(group != PANEL_GRAPH.getCurrentContext()) return; var xx = x * _s + _x; var yy = y * _s + _y; diff --git a/scripts/node_frame/node_frame.gml b/scripts/node_frame/node_frame.gml index 3b85d64de..5a00f6689 100644 --- a/scripts/node_frame/node_frame.gml +++ b/scripts/node_frame/node_frame.gml @@ -47,7 +47,7 @@ function Node_Frame(_x, _y, _group = noone) : Node(_x, _y, _group) constructor { draw_scale = 1; static drawNode = function(_x, _y, _mx, _my, _s) { draw_scale = _s; - if(group != PANEL_GRAPH.getCurrentContext()) return; + //if(group != PANEL_GRAPH.getCurrentContext()) return; if(size_dragging) { w = size_dragging_w + (mouse_mx - size_dragging_mx) / _s; diff --git a/scripts/node_gradient/node_gradient.gml b/scripts/node_gradient/node_gradient.gml index 0f184b158..4dd11e8c0 100644 --- a/scripts/node_gradient/node_gradient.gml +++ b/scripts/node_gradient/node_gradient.gml @@ -61,6 +61,7 @@ function Node_Gradient(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) _outSurf = surface_verify(_outSurf, _dim[0], _dim[1]); var _gra = _data[1]; + //print("Draw gradient " + string(_gra)) var _typ = _data[2]; var _ang = _data[3]; diff --git a/scripts/node_gradient_output/node_gradient_output.gml b/scripts/node_gradient_output/node_gradient_output.gml index 4a630a44f..fdc16e435 100644 --- a/scripts/node_gradient_output/node_gradient_output.gml +++ b/scripts/node_gradient_output/node_gradient_output.gml @@ -22,6 +22,8 @@ function Node_Gradient_Out(_x, _y, _group = noone) : Node_Processor(_x, _y, _gro var pal = _data[0]; var pos = _data[1]; + //print("Gradient out " + string(pal)) + if(_output_index == 0) return pal; if(_output_index == 1) return pal.eval(pos); return 0; diff --git a/scripts/node_iterate_each/node_iterate_each.gml b/scripts/node_iterate_each/node_iterate_each.gml index 1c4516b2b..084aedb51 100644 --- a/scripts/node_iterate_each/node_iterate_each.gml +++ b/scripts/node_iterate_each/node_iterate_each.gml @@ -55,6 +55,7 @@ function Node_Iterate_Each(_x, _y, _group = noone) : Node_Collection(_x, _y, _gr if(!is_real(maxIter)) maxIter = 1; iterated++; + //print("Iterating " + string(iterated) + "/" + string(maxIter)) if(iterated >= maxIter) { render_time = get_timer() - loop_start_time; diff --git a/scripts/node_lua_surface/node_lua_surface.gml b/scripts/node_lua_surface/node_lua_surface.gml index 2b90036cc..8b97194e9 100644 --- a/scripts/node_lua_surface/node_lua_surface.gml +++ b/scripts/node_lua_surface/node_lua_surface.gml @@ -76,7 +76,7 @@ function Node_Lua_Surface(_x, _y, _group = noone) : Node(_x, _y, _group) constru } static getState = function() { - if(inputs[| 3].value_from == noone) + if(inputs[| 3].value_from == noone) return lua_state; return inputs[| 3].value_from.node.getState(); } diff --git a/scripts/node_path/node_path.gml b/scripts/node_path/node_path.gml index 5409caffc..33a439744 100644 --- a/scripts/node_path/node_path.gml +++ b/scripts/node_path/node_path.gml @@ -136,7 +136,7 @@ function Node_Path(_x, _y, _group = noone) : Node(_x, _y, _group) constructor { oy = ny; } - if(point_distance(drag_point_mx, drag_point_my, pxx, pxy) > 4) { + if(point_distance(drag_point_mx, drag_point_my, pxx, pxy) > 4 / _s) { array_push(drag_points, [ pxx, pxy ]); drag_point_mx = pxx; @@ -181,7 +181,8 @@ function Node_Path(_x, _y, _group = noone) : Node(_x, _y, _group) constructor { var anc = []; for( i = 0; i < amo; i++ ) { - var _ind = points[i]; + var ind = replace? i : clamp(i / amo * array_length(points), 0, array_length(points) - 1); + var _ind = points[ind]; var _p = drag_points[_ind]; var dxx = 0; var dxy = 0; diff --git a/scripts/node_pin/node_pin.gml b/scripts/node_pin/node_pin.gml index 0ae26a44b..32087b0d0 100644 --- a/scripts/node_pin/node_pin.gml +++ b/scripts/node_pin/node_pin.gml @@ -28,7 +28,7 @@ function Node_Pin(_x, _y, _group = noone) : Node(_x, _y, _group) constructor { var xx = x * _s + _x; var yy = y * _s + _y; - return point_in_circle(_mx, _my, xx, yy, 24); + return point_in_circle(_mx, _my, xx, yy, _s * 24); } static preDraw = function(_x, _y, _s) { @@ -53,19 +53,19 @@ function Node_Pin(_x, _y, _group = noone) : Node(_x, _y, _group) constructor { isHovering = true; draw_sprite_stretched(THEME.node_bg, 0, xx - 12 * _s, yy - 12 * _s, 24 * _s, 24 * _s); - if(inputs[| 0].drawJunction(_s, _mx, _my, false)) + if(inputs[| 0].drawJunction(_s, _mx, _my)) hover = inputs[| 0]; - if(outputs[| 0].drawJunction(_s, _mx, _my, false)) + if(outputs[| 0].drawJunction(_s, _mx, _my)) hover = outputs[| 0]; } else if(hoverExpand > 0) { - inputs[| 0].drawJunction(_s, _mx, _my, false) - outputs[| 0].drawJunction(_s, _mx, _my, false) + inputs[| 0].drawJunction(_s, _mx, _my) + outputs[| 0].drawJunction(_s, _mx, _my) } else { var jun; if(hov != noone) jun = hov.connect_type == JUNCTION_CONNECT.input? outputs[| 0] : inputs[| 0]; else jun = inputs[| 0].value_from == noone? inputs[| 0] : outputs[| 0]; - if(jun.drawJunction(_s, _mx, _my, false)) + if(jun.drawJunction(_s, _mx, _my,)) hover = jun; } diff --git a/scripts/node_registry/node_registry.gml b/scripts/node_registry/node_registry.gml index 739e2853c..4edb13527 100644 --- a/scripts/node_registry/node_registry.gml +++ b/scripts/node_registry/node_registry.gml @@ -388,6 +388,7 @@ function NodeObject(_name, _spr, _node, _create, tags = []) constructor { ds_list_add(values, "Texts"); addNodeObject(values, "Text", s_node_text, "Node_String", [1, Node_String]); addNodeObject(values, "Unicode", s_node_unicode, "Node_Unicode", [1, Node_Unicode]); + addNodeObject(values, "Text Length", s_node_text_length, "Node_String_Length", [1, Node_String_Length]).setVersion(1138); addNodeObject(values, "Combine Text", s_node_text_combine, "Node_String_Merge", [1, Node_String_Merge]); addNodeObject(values, "Join Text", s_node_text_join, "Node_String_Join", [1, Node_String_Join]).setVersion(1120); addNodeObject(values, "Split Text", s_node_text_splice, "Node_String_Split", [1, Node_String_Split]); @@ -406,6 +407,7 @@ function NodeObject(_name, _spr, _node, _create, tags = []) constructor { addNodeObject(values, "Array Remove", s_node_array_remove, "Node_Array_Remove", [1, Node_Array_Remove], ["remove array", "delete array", "array delete"]).setVersion(1120); addNodeObject(values, "Array Reverse", s_node_array_reverse, "Node_Array_Reverse", [1, Node_Array_Reverse], ["reverse array"]).setVersion(1120); addNodeObject(values, "Array Shift", s_node_array_shift, "Node_Array_Shift", [1, Node_Array_Shift]).setVersion(1137); + addNodeObject(values, "Array Zip", s_node_array_zip, "Node_Array_Zip", [1, Node_Array_Zip]).setVersion(1138); addNodeObject(values, "Sort Array", s_node_array_sort, "Node_Array_Sort", [1, Node_Array_Sort], ["array sort"]).setVersion(1120); addNodeObject(values, "Shuffle Array", s_node_array_shuffle, "Node_Array_Shuffle", [1, Node_Array_Shuffle], ["array shuffle"]).setVersion(1120); @@ -545,7 +547,8 @@ function NodeObject(_name, _spr, _node, _create, tags = []) constructor { } function graphFocusNode(node) { - PANEL_INSPECTOR.inspecting = node; + if(!PANEL_INSPECTOR.locked) + PANEL_INSPECTOR.inspecting = node; ds_list_clear(PANEL_GRAPH.nodes_select_list); PANEL_GRAPH.node_focus = node; PANEL_GRAPH.fullView(); diff --git a/scripts/node_rigid_sim/node_rigid_sim.gml b/scripts/node_rigid_sim/node_rigid_sim.gml index eebd063e5..95a1cb9f4 100644 --- a/scripts/node_rigid_sim/node_rigid_sim.gml +++ b/scripts/node_rigid_sim/node_rigid_sim.gml @@ -21,25 +21,18 @@ function Node_Rigid_Group(_x, _y, _group = noone) : Node_Collection(_x, _y, _gro instance_destroy(oRigidbody); physics_pause_enable(true); - time_source_start(time_source_create(time_source_global, 1, time_source_units_frames, function() { - var node_list = getNodeList(); - for( var i = 0; i < ds_list_size(node_list); i++ ) { - var n = node_list[| i]; - if(variable_struct_exists(n, "reset")) - n.reset(); - } - physics_pause_enable(false); - })); + var node_list = getNodeList(); + for( var i = 0; i < ds_list_size(node_list); i++ ) { + var n = node_list[| i]; + if(variable_struct_exists(n, "reset")) + n.reset(); + } + physics_pause_enable(false); } - static onStep = function() { - RETURN_ON_REST - + static update = function() { if(ANIMATOR.current_frame == 0) reset(); - - setRenderStatus(false); - UPDATE |= RENDER_TYPE.full; } PATCH_STATIC diff --git a/scripts/node_simple_shape/node_simple_shape.gml b/scripts/node_simple_shape/node_simple_shape.gml index d6cc69359..9d1fe0b5c 100644 --- a/scripts/node_simple_shape/node_simple_shape.gml +++ b/scripts/node_simple_shape/node_simple_shape.gml @@ -98,25 +98,26 @@ function Node_Shape(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) con var _path = _data[14]; var _bgcol = _bg? colToVec4(_data[11]) : [0, 0, 0, 0]; - inputs[| 11].setVisible(_bg); inputs[| 3].setVisible(true); - inputs[| 9].setVisible(true); inputs[| 4].setVisible(true); - inputs[| 13].setVisible(true); inputs[| 5].setVisible(true); + inputs[| 6].setVisible(_path == noone); inputs[| 7].setVisible(true); inputs[| 8].setVisible(true); + inputs[| 9].setVisible(true); + inputs[| 11].setVisible(_bg); + inputs[| 13].setVisible(true); _outSurf = surface_verify(_outSurf, _dim[0], _dim[1]); if(_path != noone && struct_has(_path, "getPointRatio")) { inputs[| 3].setVisible(false); - inputs[| 9].setVisible(false); inputs[| 4].setVisible(false); - inputs[| 13].setVisible(false); inputs[| 5].setVisible(false); inputs[| 7].setVisible(false); inputs[| 8].setVisible(false); + inputs[| 9].setVisible(false); + inputs[| 13].setVisible(false); surface_set_target(_outSurf); if(_bg) draw_clear_alpha(0, 1); @@ -138,7 +139,6 @@ function Node_Shape(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) con var triangles = polygon_triangulate(points); draw_set_color(_color); - draw_primitive_begin(pr_trianglelist); for( var i = 0; i < array_length(triangles); i++ ) { var tri = triangles[i]; diff --git a/scripts/node_sprite_sheet/node_sprite_sheet.gml b/scripts/node_sprite_sheet/node_sprite_sheet.gml index 507beb1b3..8c322d9ea 100644 --- a/scripts/node_sprite_sheet/node_sprite_sheet.gml +++ b/scripts/node_sprite_sheet/node_sprite_sheet.gml @@ -123,7 +123,7 @@ function Node_Render_Sprite_Sheet(_x, _y, _group = noone) : Node(_x, _y, _group) if(array_length(anim_drawn) != ANIMATOR.frames_total) array_resize(anim_drawn, ANIMATOR.frames_total); - if(ANIMATOR.current_frame < ANIMATOR.frames_total) { + if(ANIMATOR.current_frame >= 0 && ANIMATOR.current_frame < ANIMATOR.frames_total) { if(anim_drawn[ANIMATOR.current_frame]) return; if(ANIMATOR.is_playing && ANIMATOR.frame_progress) { @@ -203,8 +203,8 @@ function Node_Render_Sprite_Sheet(_x, _y, _group = noone) : Node(_x, _y, _group) surface_reset_target(); } - if(drawn) - anim_drawn[ANIMATOR.current_frame] = true; + if(drawn) + array_safe_set(anim_drawn, ANIMATOR.current_frame, true); } static onInspectorUpdate = function(updateAll = true) { diff --git a/scripts/node_string_length/node_string_length.gml b/scripts/node_string_length/node_string_length.gml new file mode 100644 index 000000000..bc6062933 --- /dev/null +++ b/scripts/node_string_length/node_string_length.gml @@ -0,0 +1,29 @@ +function Node_String_Length(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor { + name = "Text Length"; + previewable = false; + + w = 96; + + inputs[| 0] = nodeValue("Text", self, JUNCTION_CONNECT.input, VALUE_TYPE.text, "") + .setVisible(true, true); + + inputs[| 1] = nodeValue("Mode", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0) + .setDisplay(VALUE_DISPLAY.enum_scroll, ["Character", "Word"]); + + outputs[| 0] = nodeValue("Text", self, JUNCTION_CONNECT.output, VALUE_TYPE.text, ""); + + function process_data(_output, _data, _index = 0) { + if(_data[1] == 0) + return string_length(_data[0]); + else + return array_length(string_splice(_data[0], " ")); + } + + static onDrawNode = function(xx, yy, _mx, _my, _s, _hover, _focus) { + draw_set_text(f_h5, fa_center, fa_center, COLORS._main_text); + var str = outputs[| 0].getValue(); + 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); + } +} \ No newline at end of file diff --git a/scripts/node_string_length/node_string_length.yy b/scripts/node_string_length/node_string_length.yy new file mode 100644 index 000000000..13abfb316 --- /dev/null +++ b/scripts/node_string_length/node_string_length.yy @@ -0,0 +1,11 @@ +{ + "resourceType": "GMScript", + "resourceVersion": "1.0", + "name": "node_string_length", + "isCompatibility": false, + "isDnD": false, + "parent": { + "name": "texts", + "path": "folders/nodes/data/value/texts.yy", + }, +} \ No newline at end of file diff --git a/scripts/node_string_split/node_string_split.gml b/scripts/node_string_split/node_string_split.gml index a0a485ce0..bb6e08d59 100644 --- a/scripts/node_string_split/node_string_split.gml +++ b/scripts/node_string_split/node_string_split.gml @@ -8,6 +8,7 @@ function Node_String_Split(_x, _y, _group = noone) : Node_Processor(_x, _y, _gro inputs[| 0] = nodeValue("Text", self, JUNCTION_CONNECT.input, VALUE_TYPE.text, "") .setVisible(true, true); inputs[| 1] = nodeValue("Delimiter", self, JUNCTION_CONNECT.input, VALUE_TYPE.text, " ", "Character that used to split text,\nleave blank to create character array."); + inputs[| 1].editWidget.format = TEXT_AREA_FORMAT.delimiter; outputs[| 0] = nodeValue("Text", self, JUNCTION_CONNECT.output, VALUE_TYPE.text, ""); diff --git a/scripts/node_string_trim/node_string_trim.gml b/scripts/node_string_trim/node_string_trim.gml index de12b5bff..0b72ca969 100644 --- a/scripts/node_string_trim/node_string_trim.gml +++ b/scripts/node_string_trim/node_string_trim.gml @@ -7,20 +7,71 @@ function Node_String_Trim(_x, _y, _group = noone) : Node_Processor(_x, _y, _grou inputs[| 0] = nodeValue("Text", self, JUNCTION_CONNECT.input, VALUE_TYPE.text, "") .setVisible(true, true); + inputs[| 1] = nodeValue("Head", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0); + inputs[| 2] = nodeValue("Tail", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0); + inputs[| 3] = nodeValue("Trim", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0) + .setDisplay(VALUE_DISPLAY.enum_scroll, ["Character", "Word"]); + + inputs[| 4] = nodeValue("Mode", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0, "Set to progress to use ratio, where 0 means no change and 1 means the entire length of the text.") + .setDisplay(VALUE_DISPLAY.enum_scroll, ["Counter", "Progress"]); + outputs[| 0] = nodeValue("Text", self, JUNCTION_CONNECT.output, VALUE_TYPE.text, ""); + input_display_list = [ + ["Text", false], 0, + ["Trim", false], 3, 4, 1, 2, + ]; + + function step() { + var mode = inputs[| 4].getValue(); + + inputs[| 1].type = mode? VALUE_TYPE.float : VALUE_TYPE.integer; + inputs[| 2].type = mode? VALUE_TYPE.float : VALUE_TYPE.integer; + } + function process_data(_output, _data, _index = 0) { var str = _data[0]; - str = string_copy(str, 1 + _data[1], string_length(str) - _data[1] - _data[2]); + var hed = max(0, _data[1]); + var tal = max(0, _data[2]); - return str; + var trim = _data[3]; + var mode = _data[4]; + + var _str = str; + + if(trim == 0) { + if(mode == 0) + _str = string_copy(str, 1 + hed, string_length(str) - hed - tal); + else if(mode == 1) { + var h = hed * string_length(str); + var t = tal * string_length(str); + + _str = string_copy(str, 1 + h, string_length(str) - hed - t); + } + } else if(trim == 1) { + var w = string_splice(str, " "); + _str = ""; + + if(mode == 1) { + hed *= array_length(w); + tal *= array_length(w); + } + + for( var i = hed; i < array_length(w) - tal; i++ ) + _str += (i == hed? "" : " ") + w[i]; + } + + return _str; } static onDrawNode = function(xx, yy, _mx, _my, _s, _hover, _focus) { - var str = inputs[| 1].getValue(); + var str = outputs[| 0].getValue(); + var hed = inputs[| 1].getValue(); + var tal = inputs[| 2].getValue(); + if(is_array(str) && array_length(str)) str = str[0]; diff --git a/scripts/node_text/node_text.gml b/scripts/node_text/node_text.gml index b552976ef..9596d131c 100644 --- a/scripts/node_text/node_text.gml +++ b/scripts/node_text/node_text.gml @@ -49,7 +49,12 @@ function Node_Text(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) cons static generateFont = function(_path, _size, _aa, _range) { if(ANIMATOR.is_playing) return; - if(_path == _font_current && _size == _size_current && _aa == _aa_current && _rang_current[0] == _range[0] && _rang_current[1] == _range[1]) return; + if(_path == _font_current && + _size == _size_current && + _aa == _aa_current && + _rang_current[0] == _range[0] && + _rang_current[1] == _range[1]) return; + _font_current = _path; _size_current = _size; _aa_current = _aa; @@ -59,6 +64,7 @@ function Node_Text(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) cons if(file_exists(_path)) { if(font != f_p0 && font_exists(font)) font_delete(font); + font_add_enable_aa(_aa); font = font_add(_path, _size, false, false, _range[0], _range[1]); } diff --git a/scripts/node_value/node_value.gml b/scripts/node_value/node_value.gml index 2988a08df..e32fc98d5 100644 --- a/scripts/node_value/node_value.gml +++ b/scripts/node_value/node_value.gml @@ -800,7 +800,7 @@ function NodeValue(_name, _node, _connect, _type, _value, _tooltip = "") constru var display = nodeFrom.display_type; if(display_type == VALUE_DISPLAY.gradient && typeFrom == VALUE_TYPE.color) { - if(display == VALUE_DISPLAY.gradient) + if(display == VALUE_DISPLAY.gradient || (is_struct(value) && instanceof(value) == "gradientObject")) return value; if(is_array(value)) { var amo = array_length(value); @@ -964,15 +964,6 @@ function NodeValue(_name, _node, _connect, _type, _value, _tooltip = "") constru return val; } - static getExtraData = function() { - if(value_from != noone && value_from != self) { - if(display_type == VALUE_DISPLAY.gradient && value_from.display_type != VALUE_DISPLAY.gradient) - return extra_data; - return value_from.getExtraData(); - } - return extra_data; - } - static __anim = function() { return animator.is_anim || node.update_on_frame; } diff --git a/scripts/panel_animation/panel_animation.gml b/scripts/panel_animation/panel_animation.gml index 79ac7516a..6ba4ecf54 100644 --- a/scripts/panel_animation/panel_animation.gml +++ b/scripts/panel_animation/panel_animation.gml @@ -297,6 +297,8 @@ function Panel_Animation() : PanelContent() constructor { menuItem(get_text("paste", "Paste"), function() { doPaste(value_focusing); }, THEME.paste, [ "Animation", "Paste" ]), ]; + function onFocusBegin() { PANEL_ANIMATION = self; } + function onResize() { initSize(); @@ -879,7 +881,7 @@ function Panel_Animation() : PanelContent() constructor { } else draw_sprite_ui_uniform(THEME.timeline_clock, 1, ui(22), ty - 1, 1, COLORS._main_icon, 0.75); - var hov = point_in_rectangle(msx, msy, 0, ty - ui(8), w, ty + ui(8)); + var hov = pHOVER && point_in_rectangle(msx, msy, 0, ty - ui(8), w, ty + ui(8)); if(hov) { value_hovering = prop; if(mouse_click(mb_left, pFOCUS)) @@ -1427,12 +1429,12 @@ function Panel_Animation() : PanelContent() constructor { bx += ui(36); } - + by -= ui(36); } if(mini) { var y0 = ui(8); - var y1 = by - ui(8) + ui(36); + var y1 = by + ui(36) - ui(8); var cy = (y0 + y1) / 2; if(y1 - y0 < 12) return; diff --git a/scripts/panel_collection/panel_collection.gml b/scripts/panel_collection/panel_collection.gml index a26848157..4660df065 100644 --- a/scripts/panel_collection/panel_collection.gml +++ b/scripts/panel_collection/panel_collection.gml @@ -293,6 +293,8 @@ function Panel_Collection() : PanelContent() constructor { return hh; }); + function onFocusBegin() { PANEL_COLLECTION = self; } + function onResize() { initSize(); diff --git a/scripts/panel_data/panel_data.gml b/scripts/panel_data/panel_data.gml index 63d93b765..a49c244d7 100644 --- a/scripts/panel_data/panel_data.gml +++ b/scripts/panel_data/panel_data.gml @@ -21,8 +21,8 @@ function Panel(_parent, _x, _y, _w, _h) constructor { h = _h; split = ""; - min_w = ui(32); - min_h = ui(32); + min_w = ui(40); + min_h = ui(40); dragging = -1; drag_sval = 0; @@ -75,27 +75,19 @@ function Panel(_parent, _x, _y, _w, _h) constructor { } function resizable(dw, dh, oppose = ANCHOR.left) { - if(content && (w + dw < content.min_w || h + dh < content.min_h)) { - return false; - } + if(content) + return w + dw > content.min_w && h + dh > content.min_h; - var rec = true; - for(var i = 0; i < ds_list_size(childs); i++) { - var panel = childs[| i]; - - if(panel.anchor != oppose || panel.content == noone) - if(!panel.resizable(dw, dh)) - return false; - } - - return true; + var hori = oppose == ANCHOR.left || oppose == ANCHOR.right; + var ind = hori? childs[| 1].w > childs[| 0].w : childs[| 1].h > childs[| 0].h; + return childs[| ind].resizable(dw, dh, oppose); } function refreshSize(recur = true) { //refresh content surface after resize //__debug_counter("refresh size"); if(content) { - content.w = w; - content.h = h; + content.w = max(w, content.min_w); + content.h = max(h, content.min_h); content.onResize(); } else if(ds_list_size(childs) == 2) { //print("=== Refreshing (" + string(w) + ", " + string(h) + ") " + string(split) + " ==="); @@ -109,26 +101,26 @@ function Panel(_parent, _x, _y, _w, _h) constructor { childs[| fixChild].y = y; if(split == "h") { - childs[| fixChild].w = childs[| fixChild].w / tw * w; - childs[| fixChild].h = h; + childs[| fixChild].w = round(childs[| fixChild].w / tw * w); + childs[| fixChild].h = round(h); childs[| !fixChild].x = x + childs[| fixChild].w; childs[| !fixChild].y = y; - childs[| !fixChild].w = w - childs[| fixChild].w; - childs[| !fixChild].h = h; + childs[| !fixChild].w = round(w - childs[| fixChild].w); + childs[| !fixChild].h = round(h); childs[| fixChild].anchor = ANCHOR.left; childs[| !fixChild].anchor = ANCHOR.right; } else if(split == "v") { - childs[| fixChild].w = w; - childs[| fixChild].h = childs[| fixChild].h / th * h; + childs[| fixChild].w = round(w); + childs[| fixChild].h = round(childs[| fixChild].h / th * h); childs[| !fixChild].x = x; childs[| !fixChild].y = y + childs[| fixChild].h; - childs[| !fixChild].w = w; - childs[| !fixChild].h = h - childs[| fixChild].h; + childs[| !fixChild].w = round(w); + childs[| !fixChild].h = round(h - childs[| fixChild].h); childs[| fixChild].anchor = ANCHOR.top; childs[| !fixChild].anchor = ANCHOR.bottom; @@ -148,15 +140,14 @@ function Panel(_parent, _x, _y, _w, _h) constructor { var _w = dw, _h = dh; - for(var i = 0; i < ds_list_size(childs); i++) { - var panel = childs[| i]; - - if(panel.anchor != oppose || panel.content == noone) - panel.resize(dw, dh, oppose); + if(ds_list_size(childs) == 2) { + var hori = oppose == ANCHOR.left || oppose == ANCHOR.right; + var ind = hori? childs[| 1].w > childs[| 0].w : childs[| 1].h > childs[| 0].h; + childs[| ind].resize(dw, dh, oppose); } - w = max(w + dw, min_w); - h = max(h + dh, min_h); + w = max(round(w + dw), min_w); + h = max(round(h + dh), min_h); refreshSize(false); } @@ -244,7 +235,7 @@ function Panel(_parent, _x, _y, _w, _h) constructor { if(dragging == 1) { var _mx = clamp(mouse_mx, ui(16), WIN_W - ui(16)); - var dw = _mx - drag_sm; + var dw = round(_mx - drag_sm); var res = true; for(var i = 0; i < ds_list_size(childs); i++) { @@ -276,10 +267,13 @@ function Panel(_parent, _x, _y, _w, _h) constructor { } } - if(mouse_release(mb_left)) dragging = -1; + if(mouse_release(mb_left)) { + refreshSize(); + dragging = -1; + } } else if(dragging == 2) { var _my = clamp(mouse_my, ui(16), WIN_H - ui(16)); - var dh = _my - drag_sm; + var dh = round(_my - drag_sm); var res = true; for(var i = 0; i < ds_list_size(childs); i++) { @@ -311,7 +305,10 @@ function Panel(_parent, _x, _y, _w, _h) constructor { } } - if(mouse_release(mb_left)) dragging = -1; + if(mouse_release(mb_left)) { + refreshSize(); + dragging = -1; + } } else { if(content != noone) { if(point_in_rectangle(mouse_mx, mouse_my, x + ui(2), y + ui(2), x + w - ui(4), y + h - ui(4))) { @@ -355,7 +352,17 @@ function Panel(_parent, _x, _y, _w, _h) constructor { if(ds_list_empty(childs)) return; + var min_w = ui(32); + var min_h = ui(32); var _drag = true; + if(split == "h") { + min_w = childs[| 0].min_w + childs[| 1].min_w; + min_h = max(childs[| 0].min_h + childs[| 1].min_h); + } else { + min_w = max(childs[| 0].min_w, childs[| 1].min_w); + min_h = childs[| 0].min_h + childs[| 1].min_h; + } + for(var i = 0; i < ds_list_size(childs); i++) { var _panel = childs[| i]; if(_panel.content && !_panel.content.draggable) @@ -368,10 +375,11 @@ function Panel(_parent, _x, _y, _w, _h) constructor { if!(_drag && (HOVER == noone || is_struct(HOVER))) continue; - + + var p = ui(6 - 1); switch(_panel.anchor) { case ANCHOR.left : - if(!point_in_rectangle(mouse_mx, mouse_my, _panel.x + _panel.w - ui(2), _panel.y, _panel.x + _panel.w + ui(2), _panel.y + _panel.h)) + if(!point_in_rectangle(mouse_mx, mouse_my, _panel.x + _panel.w - p, _panel.y, _panel.x + _panel.w + p, _panel.y + _panel.h)) break; CURSOR = cr_size_we; @@ -382,7 +390,7 @@ function Panel(_parent, _x, _y, _w, _h) constructor { } break; case ANCHOR.top : - if(!point_in_rectangle(mouse_mx, mouse_my, _panel.x, _panel.y + _panel.h - ui(2), _panel.x + _panel.w, _panel.y + _panel.h + ui(2))) + if(!point_in_rectangle(mouse_mx, mouse_my, _panel.x, _panel.y + _panel.h - p, _panel.x + _panel.w, _panel.y + _panel.h + p)) break; CURSOR = cr_size_ns; @@ -401,7 +409,7 @@ function Panel(_parent, _x, _y, _w, _h) constructor { function drawPanel() { if(w <= ui(16)) return; - var p = ui(8); + var p = ui(6); var m_in = point_in_rectangle(mouse_mx, mouse_my, x + p, y + p, x + w - p, y + h - p); var m_ot = point_in_rectangle(mouse_mx, mouse_my, x, y, x + w, y + h); mouse_active = m_in; @@ -421,6 +429,7 @@ function Panel(_parent, _x, _y, _w, _h) constructor { if(content) { min_w = content.min_w; min_h = content.min_h; + //print(string(instanceof(content) + ": " + string(h))); if(w >= min_w && h >= min_h) content.draw(self); } @@ -583,11 +592,12 @@ function PanelContent() constructor { x = 0; y = 0; - w = 1; - h = 1; + w = 640; + h = 480; + padding = ui(16); - min_w = ui(32); - min_h = ui(32); + min_w = ui(40); + min_h = ui(40); pFOCUS = false; pHOVER = false; diff --git a/scripts/panel_function/panel_function.gml b/scripts/panel_function/panel_function.gml index 6a0a9c254..cd8457ec4 100644 --- a/scripts/panel_function/panel_function.gml +++ b/scripts/panel_function/panel_function.gml @@ -58,18 +58,20 @@ } } - function getPanelFromName(name) { + function getPanelFromName(name, create = false) { switch(name) { - case "Panel_Menu" : return PANEL_MENU; - case "Panel_Inspector" : return PANEL_INSPECTOR; - case "Panel_Animation" : return PANEL_ANIMATION; - case "Panel_Preview" : return PANEL_PREVIEW; - case "Panel_Graph" : return PANEL_GRAPH; - case "Panel_Collection" : return PANEL_COLLECTION; + case "Panel_Menu" : return (create || findPanel(name))? new Panel_Menu() : PANEL_MENU; + case "Panel_Inspector" : return (create || findPanel(name))? new Panel_Inspector() : PANEL_INSPECTOR; + case "Panel_Animation" : return (create || findPanel(name))? new Panel_Animation() : PANEL_ANIMATION; + case "Panel_Preview" : return (create || findPanel(name))? new Panel_Preview() : PANEL_PREVIEW; + case "Panel_Graph" : return (create || findPanel(name))? new Panel_Graph() : PANEL_GRAPH; - case "Panel_Workspace" : return new Panel_Workspace(); - case "Panel_Tunnels" : return new Panel_Tunnels(); - case "Panel_History" : return new Panel_History(); + case "Panel_Collection" : return new Panel_Collection(); + case "Panel_Workspace" : return new Panel_Workspace(); + case "Panel_Tunnels" : return new Panel_Tunnels(); + case "Panel_History" : return new Panel_History(); + case "Panel_Notification" : return new Panel_Notification(); + case "Panel_Nodes" : return new Panel_Nodes(); } return noone; @@ -80,25 +82,9 @@ loadPanelStruct(panel, CURRENT_PANEL.panel); } - function panelAdd(panel) { - var f = CURRENT_PANEL; - - if(struct_has(f, panel)) { - var str = f[$ panel]; - var pan = getPanelFromName(str.parent); - var p; - - if(str.split == "v") - p = pan.panel.split_v(ui(str.width)); - else if(str.split == "h") - p = pan.panel.split_h(ui(str.width)); - - p[ str.index].set(PANEL_COLLECTION); - p[!str.index].set(pan); - } else { - var pan = getPanelFromName(panel); - if(pan) dialogPanelCall(pan); - } + function panelAdd(panel, create = false) { + var pan = getPanelFromName(panel, create); + if(pan) dialogPanelCall(pan); } function panelObjectInit() { @@ -115,10 +101,6 @@ clearPanel(); panelObjectInit(); loadPanelStruct(PANEL_MAIN, CURRENT_PANEL.panel); - - if(PREF_MAP[? "panel_collection"]) - panelAdd("Panel_Collection"); - PANEL_MAIN.refresh(); } @@ -126,15 +108,14 @@ globalvar CURRENT_PANEL; panelObjectInit(); - zip_unzip("data/layouts.zip", DIRECTORY); + if(!directory_exists(DIRECTORY + "layouts")) + zip_unzip("data/layouts.zip", DIRECTORY); + var file = DIRECTORY + "layouts/" + PREF_MAP[? "panel_layout_file"] + ".json"; if(!file_exists(file)) file = DIRECTORY + "layouts/Horizontal.json"; loadPanel(file, PANEL_MAIN); - if(PREF_MAP[? "panel_collection"]) - panelAdd("Panel_Collection"); - PANEL_ANIMATION.updatePropertyList(); PANEL_MAIN.refresh(); } @@ -338,10 +319,10 @@ #region function function panelHover(content) { - return HOVER && is_struct(HOVER) && instanceof(HOVER) == "Panel" && HOVER.content == content; + return HOVER && is_struct(HOVER) && instanceof(HOVER) == "Panel" && instanceof(HOVER.content) == instanceof(content); } function panelFocus(content) { - return FOCUS && is_struct(FOCUS) && instanceof(FOCUS) == "Panel" && FOCUS.content == content; + return FOCUS && is_struct(FOCUS) && instanceof(FOCUS) == "Panel" && instanceof(FOCUS.content) == instanceof(content); } #endregion \ No newline at end of file diff --git a/scripts/panel_graph/panel_graph.gml b/scripts/panel_graph/panel_graph.gml index 8926815f3..b1dffaaa4 100644 --- a/scripts/panel_graph/panel_graph.gml +++ b/scripts/panel_graph/panel_graph.gml @@ -221,6 +221,8 @@ function Panel_Graph() : PanelContent() constructor { tun.build_y = PANEL_GRAPH.mouse_grid_y; }); + function onFocusBegin() { PANEL_GRAPH = self; } + function stepBegin() { var gr_x = graph_x * graph_s; var gr_y = graph_y * graph_s; @@ -376,9 +378,8 @@ function Panel_Graph() : PanelContent() constructor { var gr_y = graph_y * graph_s; //var t = current_time; - for(var i = 0; i < ds_list_size(nodes_list); i++) { + for(var i = 0; i < ds_list_size(nodes_list); i++) nodes_list[| i].preDraw(gr_x, gr_y, graph_s); - } //print("Predraw time: " + string(current_time - t)); t = current_time; #region draw frame @@ -397,6 +398,13 @@ function Panel_Graph() : PanelContent() constructor { if(n.pointIn(gr_x, gr_y, mx, my, graph_s)) node_hovering = n; } + + if(node_hovering != noone && pFOCUS && struct_has(node_hovering, "nodes") && DOUBLE_CLICK) { + addContext(node_hovering); + DOUBLE_CLICK = false; + + node_hovering = noone; + } #endregion //print("Hover time: " + string(current_time - t)); t = current_time; @@ -452,7 +460,7 @@ function Panel_Graph() : PanelContent() constructor { } else { ds_list_clear(nodes_select_list); - if(DOUBLE_CLICK) + if(DOUBLE_CLICK && !PANEL_INSPECTOR.locked) PANEL_INSPECTOR.inspecting = noone; } } diff --git a/scripts/panel_inspector/panel_inspector.gml b/scripts/panel_inspector/panel_inspector.gml index f7cb3065b..3ef4f5ce9 100644 --- a/scripts/panel_inspector/panel_inspector.gml +++ b/scripts/panel_inspector/panel_inspector.gml @@ -7,8 +7,9 @@ function Panel_Inspector() : PanelContent() constructor { title = "Inspector"; context_str = "Inspector"; - inspecting = noone; - top_bar_h = ui(96); + locked = false; + inspecting = noone; + top_bar_h = ui(96); prop_hover = noone; prop_selecting = noone; @@ -86,6 +87,8 @@ function Panel_Inspector() : PanelContent() constructor { }), ] + function onFocusBegin() { PANEL_INSPECTOR = self; } + function onResize() { initSize(); contentPane.resize(content_w, content_h); @@ -131,7 +134,7 @@ function Panel_Inspector() : PanelContent() constructor { var display = meta.displays[j]; draw_set_text(f_p0, fa_left, fa_top, COLORS._main_text); - draw_text_over(ui(16), yy, display[0]); + draw_text_add(ui(16), yy, display[0]); yy += line_height() + ui(6); hh += line_height() + ui(6); @@ -799,6 +802,11 @@ function Panel_Inspector() : PanelContent() constructor { draw_set_text(f_p1, fa_center, fa_center, COLORS._main_text_sub); draw_text(w / 2, ui(56), inspecting.name); + var lx = w / 2 - string_width(inspecting.name) / 2 - ui(18); + var ly = ui(56 - 8); + if(buttonInstant(THEME.button_hide, lx, ly, ui(16), ui(16), [mx, my], pFOCUS, pHOVER, "Lock", THEME.lock, !locked, locked? COLORS._main_icon_light : COLORS._main_icon,, 0.5) == 2) + locked = !locked; + var bx = ui(8); var by = ui(12); @@ -850,7 +858,7 @@ function Panel_Inspector() : PanelContent() constructor { } function drawContent(panel) { - draw_clear_alpha(COLORS.panel_bg_clear, 0); + draw_clear(COLORS.panel_bg_clear); lineBreak = w < PREF_MAP[? "inspector_line_break_width"]; draw_sprite_stretched(THEME.ui_panel_bg, 1, ui(8), top_bar_h - ui(8), w - ui(16), h - top_bar_h); @@ -867,7 +875,7 @@ function Panel_Inspector() : PanelContent() constructor { txt = context.name; draw_set_text(f_h5, fa_center, fa_center, COLORS._main_text); - draw_text_over(w / 2, ui(30), txt); + draw_text_add(w / 2, ui(30), txt); var bx = w - ui(44); var by = ui(12); @@ -913,7 +921,7 @@ function Panel_Inspector() : PanelContent() constructor { contentPane.active = pHOVER; contentPane.draw(ui(16), top_bar_h, mx - ui(16), my - top_bar_h); - if(PANEL_GRAPH.node_focus && inspecting != PANEL_GRAPH.node_focus) { + if(!locked && PANEL_GRAPH.node_focus && inspecting != PANEL_GRAPH.node_focus) { inspecting = PANEL_GRAPH.node_focus; if(inspecting != noone) inspecting.onInspect(); diff --git a/scripts/panel_menu/panel_menu.gml b/scripts/panel_menu/panel_menu.gml index b8a5a62f9..b93614ab7 100644 --- a/scripts/panel_menu/panel_menu.gml +++ b/scripts/panel_menu/panel_menu.gml @@ -150,6 +150,7 @@ function Panel_Menu() : PanelContent() constructor { array_push(arr, menuItem("Save layout", function() { var dia = dialogCall(o_dialog_file_name, mouse_mx + ui(8), mouse_my + ui(8)); + dia.name = PREF_MAP[? "panel_layout_file"]; dia.onModify = function(name) { var cont = panelSerialize(); json_save_struct(DIRECTORY + "layouts/" + name + ".json", cont); @@ -163,22 +164,20 @@ function Panel_Menu() : PanelContent() constructor { PREF_MAP[? "panel_layout_file"] = _path; PREF_SAVE(); setPanel(); - })); + },,, function(item) { return item.name == PREF_MAP[? "panel_layout_file"]; } )); } return submenuCall(_x, _y, _depth, arr); }).setIsShelf(), -1, - menuItem(get_text("panel_menu_collections", "Collections"), function() { - PREF_MAP[? "panel_collection"] = !PREF_MAP[? "panel_collection"]; - resetPanel(); - PREF_SAVE(); - },,, function() { return findPanel("Panel_Collection") != noone; } ), - menuItem(get_text("panel_menu_graph", "Graph"), function() { panelAdd("Panel_Graph") },,, function() { return findPanel("Panel_Graph") != noone; } ), - menuItem(get_text("panel_menu_preview", "Preview"), function() { panelAdd("Panel_Preview") },,, function() { return findPanel("Panel_Preview") != noone; } ), - menuItem(get_text("panel_menu_inspector", "Inspector"), function() { panelAdd("Panel_Inspector") },,, function() { return findPanel("Panel_Inspector") != noone; } ), - menuItem(get_text("panel_menu_workspace", "Workspace"), function() { panelAdd("Panel_Workspace") },,, function() { return findPanel("Panel_Workspace") != noone; } ), - menuItem(get_text("panel_menu_animation", "Animation"), function() { panelAdd("Panel_Animation") },,, function() { return findPanel("Panel_Animation") != noone; } ), + menuItem(get_text("panel_menu_collections", "Collections"), function() { panelAdd("Panel_Collection", true) },,, function() { return findPanel("Panel_Collection") != noone; } ), + menuItem(get_text("panel_menu_graph", "Graph"), function() { panelAdd("Panel_Graph", true) },,, function() { return findPanel("Panel_Graph") != noone; } ), + menuItem(get_text("panel_menu_preview", "Preview"), function() { panelAdd("Panel_Preview", true) },,, function() { return findPanel("Panel_Preview") != noone; } ), + menuItem(get_text("panel_menu_inspector", "Inspector"), function() { panelAdd("Panel_Inspector", true) },,, function() { return findPanel("Panel_Inspector") != noone; } ), + menuItem(get_text("panel_menu_workspace", "Workspace"), function() { panelAdd("Panel_Workspace", true) },,, function() { return findPanel("Panel_Workspace") != noone; } ), + menuItem(get_text("panel_menu_animation", "Animation"), function() { panelAdd("Panel_Animation", true) },,, function() { return findPanel("Panel_Animation") != noone; } ), + menuItem(get_text("panel_menu_notification", "Notification"), function() { panelAdd("Panel_Notification", true) },,, function() { return findPanel("Panel_Notification") != noone; } ), + menuItem(get_text("panel_menu_nodes", "Nodes"), function() { panelAdd("Panel_Nodes", true) },,, function() { return findPanel("Panel_Nodes") != noone; } ), menuItem(get_text("tunnels", "Tunnels"), function() { dialogPanelCall(new Panel_Tunnels()); },, ["Graph", "Tunnels"]), @@ -214,6 +213,8 @@ function Panel_Menu() : PanelContent() constructor { ]]); } + function onFocusBegin() { PANEL_MENU = self; } + function setNotiIcon(icon) { noti_icon = icon; noti_icon_time = 90; diff --git a/scripts/panel_nodes/panel_nodes.gml b/scripts/panel_nodes/panel_nodes.gml new file mode 100644 index 000000000..fe26680af --- /dev/null +++ b/scripts/panel_nodes/panel_nodes.gml @@ -0,0 +1,120 @@ +function Panel_Nodes() : PanelContent() constructor { + #region data + title = "Nodes"; + + w = ui(320); + h = ui(480); + + search_string = ""; + + tb_search = new textBox(TEXTBOX_INPUT.text, function(str) { + search_string = string(str); + }); + tb_search.align = fa_left; + tb_search.auto_update = true; + tb_search.boxColor = COLORS._main_icon_light; + + node_collapse = ds_map_create(); + #endregion + + function onResize() { + sc_nodes.resize(w - ui(padding + padding), h - ui(padding + padding + 40)); + } + + function drawNodeList(_list, _x0, _x1, _y, _m) { + var ww = sc_nodes.surface_w; + var hg = ui(28); + + var _h = 0; + + for( var i = 0; i < ds_list_size(_list); i++ ) { + var node = _list[| i]; + var name = node.display_name == ""? node.name : node.display_name; + + if(string_lower(search_string) != "" && string_lower(string_pos(search_string, name)) == 0) + continue; + + var isGroup = struct_has(node, "nodes"); + if(isGroup && !ds_map_exists(node_collapse, node.node_id)) + node_collapse[? node.node_id] = false; + + if(pHOVER && point_in_rectangle(_m[0], _m[1], _x0, _y, _x1 - _x0 - ui(32), _y + hg)) { + var cc = merge_color(COLORS._main_icon_light, COLORS._main_icon, 0.25); + draw_sprite_stretched_ext(THEME.ui_panel_bg, 0, _x0, _y, _x1 - _x0, hg, cc, 1); + + if(sc_nodes.active) { + if(DOUBLE_CLICK) + PANEL_PREVIEW.setNodePreview(node); + else if(mouse_press(mb_left)) { + if(isGroup) + node_collapse[? node.node_id] = !node_collapse[? node.node_id]; + if(!PANEL_INSPECTOR.locked) + PANEL_INSPECTOR.inspecting = node; + ds_list_clear(PANEL_GRAPH.nodes_select_list); + PANEL_GRAPH.node_focus = node; + } + } + } else + draw_sprite_stretched_ext(THEME.ui_panel_bg, 0, _x0, _y, _x1 - _x0, hg, COLORS._main_icon_light, 1); + + var bw = ui(24); + var bh = ui(24); + var bx = _x1 - ui(4) - bw; + var by = _y + (hg - bh) / 2; + + if(buttonInstant(THEME.button_hide, bx, by, bw, bh, _m, sc_nodes.active, sc_nodes.hover, "Go to node", THEME.node_goto,, COLORS._main_icon, 0.75, 0.75) == 2) + graphFocusNode(node); + bx -= ui(32); + + var _n = ALL_NODES[? instanceof(node)]; + var spr = _n.spr; + draw_sprite_ui(spr, 1, _x0 + ui(4 + 16), _y + hg / 2, 0.5, 0.5, 0, c_white, 0.75); + var cc = COLORS._main_text; + draw_set_text(f_p1, fa_left, fa_center, cc); + draw_text(_x0 + hg + ui(8) + (isGroup * ui(20)), _y + hg / 2, name); + if(isGroup) + draw_sprite_ui(THEME.arrow, node_collapse[? node.node_id] * 3, _x0 + hg + ui(16), _y + hg / 2,,,,, 0.75); + + _y += hg + ui(4); + _h += hg + ui(4); + + if(isGroup && !node_collapse[? node.node_id]) { + var hh = drawNodeList(node.nodes, _x0 + ui(16), _x1, _y, _m); + _y += hh + ui(4); + _h += hh + ui(4); + } + } + + return _h; + } + + #region content + sc_nodes = new scrollPane(w - ui(padding + padding), h - ui(padding + padding + 40), function(_y, _m) { + draw_clear_alpha(COLORS.panel_bg_clear, 0); + var _h = drawNodeList(NODES, 0, sc_nodes.surface_w, _y, _m); + return _h; + }) + #endregion + + function drawContent(panel) { + var px = ui(padding); + var py = ui(padding); + var pw = w - ui(padding + padding); + var ph = h - ui(padding + padding); + + draw_sprite_stretched(THEME.ui_panel_bg, !in_dialog, px - ui(8), py - ui(8), pw + ui(16), ph + ui(16)); + tb_search.setActiveFocus(pFOCUS, pHOVER); + tb_search.draw(px, py, pw, ui(32), search_string, [mx, my]); + + sc_nodes.setActiveFocus(pFOCUS, pHOVER); + sc_nodes.draw(px, py + ui(40), mx - px, my - (py + ui(40))); + + //var bx = w - ui(32 + 16); + //var by = title_height / 2 - ui(14); + + //if(buttonInstant(THEME.button_hide, bx, by, ui(32), ui(32), [mx, my], pFOCUS, pHOVER, "Create tunnel", THEME.tunnel, 1, c_white) == 2) { + // nodeBuild("Node_Tunnel_In", build_x, build_y); + // instance_destroy(); + //} + } +} \ No newline at end of file diff --git a/scripts/panel_nodes/panel_nodes.yy b/scripts/panel_nodes/panel_nodes.yy new file mode 100644 index 000000000..86a11ea22 --- /dev/null +++ b/scripts/panel_nodes/panel_nodes.yy @@ -0,0 +1,11 @@ +{ + "resourceType": "GMScript", + "resourceVersion": "1.0", + "name": "panel_nodes", + "isCompatibility": false, + "isDnD": false, + "parent": { + "name": "graph", + "path": "folders/panels/data/graph.yy", + }, +} \ No newline at end of file diff --git a/scripts/panel_preview/panel_preview.gml b/scripts/panel_preview/panel_preview.gml index f77734ef5..206b05420 100644 --- a/scripts/panel_preview/panel_preview.gml +++ b/scripts/panel_preview/panel_preview.gml @@ -194,6 +194,8 @@ function Panel_Preview() : PanelContent() constructor { } } + function onFocusBegin() { PANEL_PREVIEW = self; } + function dragCanvas() { if(canvas_dragging) { if(!MOUSE_WRAPPING) { @@ -466,6 +468,13 @@ function Panel_Preview() : PanelContent() constructor { function drawPreviewOverlay() { right_menu_y = toolbar_height - ui(4); + + if(PANEL_PREVIEW == self) { + draw_set_text(f_p0, fa_right, fa_top, COLORS._main_text_accent); + draw_text(w - ui(8), right_menu_y, "Active"); + right_menu_y += string_height("l"); + } + draw_set_text(f_p0, fa_right, fa_top, fps >= ANIMATOR.framerate? COLORS._main_text_sub : COLORS._main_value_negative); draw_text(w - ui(8), right_menu_y, "fps " + string(fps)); right_menu_y += string_height("l"); @@ -713,11 +722,13 @@ function Panel_Preview() : PanelContent() constructor { draw_set_color(COLORS._main_text_sub); draw_text(tx, cy + ch / 2, "(" + string(color_get_alpha(sample_color)) + ")"); } + } - if(sample_x != noone) { - draw_set_text(f_p0, fa_right, fa_center, COLORS._main_text_sub); - draw_text(w - ui(10), cy + ch / 2, "[" + string(sample_x) + ", " + string(sample_y) + "]"); - } + if(pHOVER) { + draw_set_text(f_p0, fa_right, fa_center, COLORS._main_text_sub); + var mpx = floor((mx - canvas_x) / canvas_s); + var mpy = floor((my - canvas_y) / canvas_s); + draw_text(w - ui(10), toolbar_height / 2 - ui(4), "[" + string(mpx) + ", " + string(mpy) + "]"); } draw_set_color(COLORS.panel_toolbar_fill); @@ -824,7 +835,7 @@ function Panel_Preview() : PanelContent() constructor { mouse_on_preview = pHOVER && point_in_rectangle(mx, my, 0, toolbar_height, w, h - toolbar_height); draw_clear(COLORS.panel_bg_clear); - if(canvas_bg == -1 && canvas_s >= 1) + if(canvas_bg == -1 && canvas_s >= 0.1) draw_sprite_tiled_ext(s_transparent, 0, canvas_x, canvas_y, canvas_s, canvas_s, c_white, 0.5); else draw_clear(canvas_bg); @@ -850,8 +861,8 @@ function Panel_Preview() : PanelContent() constructor { menuCall(,, [ menuItem(get_text("panel_graph_preview_window", "Send to preview window"), function() { previewWindow(getNodePreview()); }, noone, ["Preview", "Preview window"]), -1, - menuItem(get_text("panel_preview_save", "Save current preview as") + "...", function() { PANEL_PREVIEW.saveCurrentFrame(); }), - menuItem(get_text("panel_preview_save_all", "Save all current previews as") + "...", function() { PANEL_PREVIEW.saveAllCurrentFrames(); }), + menuItem(get_text("panel_preview_save", "Save current preview as") + "...", function() { saveCurrentFrame(); }), + menuItem(get_text("panel_preview_save_all", "Save all current previews as") + "...", function() { saveAllCurrentFrames(); }), -1, menuItem(get_text("panel_preview_copy_color", "Copy color [") + string(sample_color) + "]", function() { clipboard_set_text(sample_color); }), menuItem(get_text("panel_preview_copy_color", "Copy hex [") + string(color_get_hex(sample_color)) + "]", function() { clipboard_set_text(color_get_hex(sample_color)); }), diff --git a/scripts/panel_tunnels/panel_tunnels.gml b/scripts/panel_tunnels/panel_tunnels.gml index 0d9dc8510..8341210eb 100644 --- a/scripts/panel_tunnels/panel_tunnels.gml +++ b/scripts/panel_tunnels/panel_tunnels.gml @@ -1,6 +1,7 @@ function Panel_Tunnels() : PanelContent() constructor { #region data title = "Tunnels"; + showHeader = false; w = ui(320); h = ui(480); @@ -14,7 +15,6 @@ function Panel_Tunnels() : PanelContent() constructor { tunnel_ins = []; tunnel_select = noone; tunnel_hover = noone; - showHeader = false; function scanNodes() { var amo = ds_map_size(NODE_MAP); @@ -62,11 +62,11 @@ function Panel_Tunnels() : PanelContent() constructor { function onResize() { PANEL_PADDING - sc_tunnel.resize(w - ui(padding + padding), h - ui(title_height + padding)); + sc_tunnel.resize(w - ui(padding + padding), h - ui(title_height + padding + 40)); } #region content - sc_tunnel = new scrollPane(w - ui(padding + padding), h - ui(title_height + padding), function(_y, _m) { + sc_tunnel = new scrollPane(w - ui(padding + padding), h - ui(title_height + padding + 40), function(_y, _m) { draw_clear_alpha(COLORS.panel_bg_clear, 0); var _h = 0; var ww = sc_tunnel.surface_w; diff --git a/scripts/panel_workspace/panel_workspace.gml b/scripts/panel_workspace/panel_workspace.gml index 03d615ac2..e7cd36961 100644 --- a/scripts/panel_workspace/panel_workspace.gml +++ b/scripts/panel_workspace/panel_workspace.gml @@ -1,7 +1,12 @@ function Panel_Workspace() : PanelContent() constructor { workspaces = []; w = ui(480); - h = ui(96); + h = ui(40); + + scroll = 0; + scroll_to = 0; + scroll_max = 0; + hori = false; function refreshContent() { workspaces = []; @@ -14,13 +19,20 @@ function Panel_Workspace() : PanelContent() constructor { } refreshContent(); + function onFocusBegin() { refreshContent(); } + function drawContent(panel) { draw_clear(COLORS.panel_bg_clear); - var hori = w > h; + var _hori = hori; + hori = w > h; - var x0 = ui(6), x1; - var y0 = ui(6), y1; + if(hori != _hori) scroll_to = 0; + + var x0 = hori? ui(6) + scroll : ui(6), x1; + var y0 = hori? ui(6) : ui(6) + scroll, y1; + var ww = 0; + var hh = 0; draw_set_text(f_p1, hori? fa_left : fa_center, fa_top, COLORS._main_text_sub); @@ -44,8 +56,29 @@ function Panel_Workspace() : PanelContent() constructor { draw_set_color(PREF_MAP[? "panel_layout_file"] == workspaces[i]? COLORS._main_text : COLORS._main_text_sub) draw_text_add(hori? x0 + ui(8) : (x0 + x1) / 2, y0 + ui(4), workspaces[i]); - if(hori) x0 += tw + ui(4); - else y0 += th + ui(4); + if(hori) { + x0 += tw + ui(4); + ww += tw + ui(4); + } else { + y0 += th + ui(4); + hh += th + ui(4); + } + } + + scroll = lerp_float(scroll, scroll_to, 5); + + if(hori) { + scroll_max = max(ww - w + ui(16), 0); + if(pHOVER) { + if(mouse_wheel_down()) scroll_to = clamp(scroll_to - ui(128), -scroll_max, 0); + if(mouse_wheel_up()) scroll_to = clamp(scroll_to + ui(128), -scroll_max, 0); + } + } else { + scroll_max = max(hh - h + ui(16), 0); + if(pHOVER) { + if(mouse_wheel_down()) scroll_to = clamp(scroll_to - ui(32), -scroll_max, 0); + if(mouse_wheel_up()) scroll_to = clamp(scroll_to + ui(32), -scroll_max, 0); + } } } } \ No newline at end of file diff --git a/scripts/preferences/preferences.gml b/scripts/preferences/preferences.gml index b87b2cec6..f8955289a 100644 --- a/scripts/preferences/preferences.gml +++ b/scripts/preferences/preferences.gml @@ -30,7 +30,6 @@ PREF_MAP[? "default_surface_side"] = 32; PREF_MAP[? "panel_layout_file"] = "Vertical"; - PREF_MAP[? "panel_collection"] = true; PREF_MAP[? "inspector_line_break_width"] = 500; diff --git a/scripts/surface_functions/surface_functions.gml b/scripts/surface_functions/surface_functions.gml index 6e317866a..ec3c37aa5 100644 --- a/scripts/surface_functions/surface_functions.gml +++ b/scripts/surface_functions/surface_functions.gml @@ -21,6 +21,7 @@ function draw_surface_part_ext_safe(surface, _l, _t, _w, _h, _x, _y, _xs = 1, _y } //check +gml_pragma("forceinline"); function is_surface(s) { if(is_undefined(s)) return false; if(is_array(s)) return false; @@ -188,7 +189,7 @@ function __surface_array_serialize(arr) { var buff = buffer_create(surface_get_width(arr) * surface_get_height(arr) * 4, buffer_fixed, 1); buffer_get_surface(buff, arr, 0); var comp = buffer_compress(buff, 0, buffer_get_size(buff)); - var enc = buffer_base64_encode(comp, 0, buffer_get_size(comp)); + var enc = buffer_base64_encode(comp, 0, buffer_get_size(comp)); buffer_delete(buff); return { width: surface_get_width(arr), height: surface_get_height(arr), buffer: enc }; } else @@ -205,13 +206,13 @@ function __surface_array_serialize(arr) { function surface_array_deserialize(arr, index = -1) { var _arr = json_try_parse(arr); - return index == -1? __surface_array_deserialize(_arr, index) : __surface_array_deserialize(_arr[index]); + return index == -1? __surface_array_deserialize(_arr) : __surface_array_deserialize(_arr[index]); } function __surface_array_deserialize(arr) { if(!is_array(arr)) { var buff = buffer_base64_decode(arr.buffer); - var buff = buffer_decompress(buff); + buff = buffer_decompress(buff); return surface_create_from_buffer(arr.width, arr.height, buff); } diff --git a/scripts/textArea/textArea.gml b/scripts/textArea/textArea.gml index 02a2d4340..edb094716 100644 --- a/scripts/textArea/textArea.gml +++ b/scripts/textArea/textArea.gml @@ -362,6 +362,12 @@ function textArea(_input, _onModify, _extras = noone) : textInput(_input, _onMod _text = string_real(_text); _current_text = _text; + //if(format == TEXT_AREA_FORMAT.code) { + // print("=== TEXT BOX ==="); + // print(_text); + // print(_current_text); + //} + if(extras && instanceof(extras) == "buttonClass") { extras.hover = hover; extras.active = active; diff --git a/shaders/sh_cell_noise/sh_cell_noise.fsh b/shaders/sh_cell_noise/sh_cell_noise.fsh index d5bab2c16..3e839c09a 100644 --- a/shaders/sh_cell_noise/sh_cell_noise.fsh +++ b/shaders/sh_cell_noise/sh_cell_noise.fsh @@ -43,7 +43,7 @@ void main() { for (int y = -1; y <= 1; y++) { for (int x = -1; x <= 1; x++) { vec2 neighbor = vec2(float(x),float(y)); - vec2 point = random2(i_st + neighbor); + vec2 point = random2(mod(i_st + neighbor, scale)); point = 0.5 + 0.5 * sin(time + 6.2831 * point); vec2 _diff = neighbor + point - f_st; diff --git a/shaders/sh_cell_noise_crystal/sh_cell_noise_crystal.fsh b/shaders/sh_cell_noise_crystal/sh_cell_noise_crystal.fsh index d4dc3eaa6..e88d3fe02 100644 --- a/shaders/sh_cell_noise_crystal/sh_cell_noise_crystal.fsh +++ b/shaders/sh_cell_noise_crystal/sh_cell_noise_crystal.fsh @@ -25,19 +25,19 @@ vec2 cellular(vec2 P) { vec3 oi = vec3(-1.0, 0.0, 1.0); vec3 of = vec3(-0.5, 0.5, 1.5); vec3 px = permute(Pi.x + oi); - vec3 p = permute(px.x + Pi.y + oi); // p11, p12, p13 + vec3 p = permute(px.x + Pi.y + oi); // p11, p12, p13 vec3 ox = fract(p * K) - Ko; vec3 oy = mod7(floor(p * K)) * K - Ko; vec3 dx = Pf.x + 0.5 + jitter * ox; vec3 dy = Pf.y - of + jitter * oy; vec3 d1 = dx * dx + dy * dy; // d11, d12 and d13, squared - p = permute(px.y + Pi.y + oi); // p21, p22, p23 + p = permute(px.y + Pi.y + oi); // p21, p22, p23 ox = fract(p * K) - Ko; oy = mod7(floor(p * K)) * K - Ko; dx = Pf.x - 0.5 + jitter * ox; dy = Pf.y - of + jitter * oy; vec3 d2 = dx * dx + dy * dy; // d21, d22 and d23, squared - p = permute(px.z + Pi.y + oi); // p31, p32, p33 + p = permute(px.z + Pi.y + oi); // p31, p32, p33 ox = fract(p * K) - Ko; oy = mod7(floor(p * K)) * K - Ko; dx = Pf.x - 1.5 + jitter * ox; @@ -57,11 +57,9 @@ vec2 cellular(vec2 P) { return sqrt(d1.xy); } -float color(vec2 xy) { return cellular(xy).y * 2.0 - 1.0; } - void main() { - vec2 p = (v_vTexcoord - position / dimension) * scale * 2.0 - 1.0; - float n = 0.5 + 0.5 * color(p); + vec2 p = (v_vTexcoord - position / dimension) * scale * 2.0 - 1.0; + float n = cellular(p).y; gl_FragColor = vec4(vec3(n), 1.); } diff --git a/shaders/sh_cell_noise_edge/sh_cell_noise_edge.fsh b/shaders/sh_cell_noise_edge/sh_cell_noise_edge.fsh index 57bdbfe92..cc809ee55 100644 --- a/shaders/sh_cell_noise_edge/sh_cell_noise_edge.fsh +++ b/shaders/sh_cell_noise_edge/sh_cell_noise_edge.fsh @@ -15,6 +15,7 @@ uniform float radiusShatter; uniform int pattern; #define TAU 6.283185307179586 +#define PI 3.14159265359 vec2 random2( vec2 p ) { return fract(sin(vec2(dot(p, vec2(127.1, 311.7)), dot(p, vec2(269.5, 183.3)))) * 43758.5453); @@ -40,8 +41,8 @@ void main() { for (int y = -1; y <= 1; y++) { for (int x = -1; x <= 1; x++) { vec2 neighbor = vec2(float(x), float(y)); - vec2 point = random2(i_st + neighbor); - point += 0.5 + 0.5 * sin(time + 6.2831 * point); + vec2 point = random2(mod(i_st + neighbor, scale)); + point += 0.5 + 0.5 * sin(time + TAU * point); vec2 _diff = neighbor + point - f_st; float dist = length(_diff); @@ -58,11 +59,11 @@ void main() { for(int y = -2; y <= 2; y++) for(int x = -2; x <= 2; x++) { vec2 g = mg + vec2(float(x), float(y)); - vec2 point = random2(i_st + g); - point += 0.5 + 0.5 * sin(time + 6.2831 * point); + vec2 point = random2(mod(i_st + g, scale)); + point += 0.5 + 0.5 * sin(time + TAU * point); vec2 r = g + point - f_st; - if(dot(mr - r, mr - r) > .0001) + if(dot(mr - r, mr - r) > .000001) md = min( md, dot( 0.5 * (mr + r), normalize(r - mr)) ); } } else if(pattern == 1) { diff --git a/shaders/sh_cell_noise_random/sh_cell_noise_random.fsh b/shaders/sh_cell_noise_random/sh_cell_noise_random.fsh index 326cee0a8..bd165a142 100644 --- a/shaders/sh_cell_noise_random/sh_cell_noise_random.fsh +++ b/shaders/sh_cell_noise_random/sh_cell_noise_random.fsh @@ -41,7 +41,7 @@ void main() { for (int y = -1; y <= 1; y++) { for (int x = -1; x <= 1; x++) { vec2 neighbor = vec2(float(x),float(y)); - vec2 point = random2(i_st + neighbor); + vec2 point = random2(mod(i_st + neighbor, scale)); point = 0.5 + 0.5 * sin(time + 6.2831 * point); vec2 _diff = neighbor + point - f_st; diff --git a/shaders/sh_shape/sh_shape.fsh b/shaders/sh_shape/sh_shape.fsh index e9ad2c054..354c9653a 100644 --- a/shaders/sh_shape/sh_shape.fsh +++ b/shaders/sh_shape/sh_shape.fsh @@ -1,6 +1,5 @@ -// -// Simple passthrough fragment shader -// +#extension GL_OES_standard_derivatives : require + varying vec2 v_vTexcoord; varying vec4 v_vColour; @@ -142,7 +141,7 @@ void main() { else if(aa == 0) color = step(d, 0.0); else - color = smoothstep(0.05, 0., d); + color = smoothstep(0.02, -0.02, d); gl_FragColor = mix(bgColor, v_vColour, color); } diff --git a/sprites/s_node_array_zip/48ee54bd-54d6-4f20-9848-4d25dbef1511.png b/sprites/s_node_array_zip/48ee54bd-54d6-4f20-9848-4d25dbef1511.png new file mode 100644 index 0000000000000000000000000000000000000000..61d7e26489b050fef74cecdfba731d2608ee6c48 GIT binary patch literal 1136 zcmeAS@N?(olHy`uVBq!ia0vp^4j|0I1|(Ny7TyC=3dtTpz6=aiY77hwEes65fI|H*Yfq^;M)5S5Q;?~>Q_Wr?v z636OuIU?9{{}>DE8VIuQ>@?gceD{?~FJDi|>oCKQ%wL#iaNONhS~{U&a=CV}Z^y?+ z2?dN=iB7(y8i#_~tGo8rH=KUE)7Ig9{_D)o^PX4U{=Dt^9@~v&yU!{JhwD0+I!|=b z6+hO;dW_WYW^KS?>H+GOa!LU-nv5i0a&i_vbO)Gfi>{~sV*WKq@{_ed0 zjZF_8S6lpgUGeI5v${-g4_ogQhAfAx9_iWpI5)gX6I#Kv`T5n#{NKXn^(J$k&EMZ- zU4B@yeDi+p_i@&fKD;jLdN0g>*d?0vlbh9TmW?beKcgf*GjxVswlpwSKW}qmW7;#n z`NkHT9egY7)-i@wMeOgqmjC>~62I1O!!=k;ekoT<3++1>Xw%o>s}b4&wvd`(SP z{J8FHgvY}FkAJNxSDtHYyslz-u>)ti@9eFw($xB5KiqlNd*GSA1<*#3IG%@VXV=K= zzEvLlN~B|T%ZHF6-t?r@;`QlsjY+Cf=1-e0-&vf#*CpEY(#@FV z9M2kiGeY7$%v#caM?1V>FuuXwW?NiRp%A(Kn(fB-O14++6Z{(d8pO~4XFeq2c=&6@@7vGI z?7J3(nm3DW5bk~u5WYc0vAQ`gWfr@HoTq`A-Bs@n5d;1+(WSw4`4{{*KW4`<^It|BbbN zmRZbp{G#-g@U$g&rMkcEnj@Wg{rQ)zmMbsiBzgUO_QmvAUQh^kMk%5u1u7Rc?Tp_QqTm9c@gfq|8Q zfn558%_tgj^HVa@DsgMbx6y1$ literal 0 HcmV?d00001 diff --git a/sprites/s_node_array_zip/layers/48ee54bd-54d6-4f20-9848-4d25dbef1511/fa3b4a6e-2119-408a-b47a-d44e1d4ac7ab.png b/sprites/s_node_array_zip/layers/48ee54bd-54d6-4f20-9848-4d25dbef1511/fa3b4a6e-2119-408a-b47a-d44e1d4ac7ab.png new file mode 100644 index 0000000000000000000000000000000000000000..61d7e26489b050fef74cecdfba731d2608ee6c48 GIT binary patch literal 1136 zcmeAS@N?(olHy`uVBq!ia0vp^4j|0I1|(Ny7TyC=3dtTpz6=aiY77hwEes65fI|H*Yfq^;M)5S5Q;?~>Q_Wr?v z636OuIU?9{{}>DE8VIuQ>@?gceD{?~FJDi|>oCKQ%wL#iaNONhS~{U&a=CV}Z^y?+ z2?dN=iB7(y8i#_~tGo8rH=KUE)7Ig9{_D)o^PX4U{=Dt^9@~v&yU!{JhwD0+I!|=b z6+hO;dW_WYW^KS?>H+GOa!LU-nv5i0a&i_vbO)Gfi>{~sV*WKq@{_ed0 zjZF_8S6lpgUGeI5v${-g4_ogQhAfAx9_iWpI5)gX6I#Kv`T5n#{NKXn^(J$k&EMZ- zU4B@yeDi+p_i@&fKD;jLdN0g>*d?0vlbh9TmW?beKcgf*GjxVswlpwSKW}qmW7;#n z`NkHT9egY7)-i@wMeOgqmjC>~62I1O!!=k;ekoT<3++1>Xw%o>s}b4&wvd`(SP z{J8FHgvY}FkAJNxSDtHYyslz-u>)ti@9eFw($xB5KiqlNd*GSA1<*#3IG%@VXV=K= zzEvLlN~B|T%ZHF6-t?r@;`QlsjY+Cf=1-e0-&vf#*CpEY(#@FV z9M2kiGeY7$%v#caM?1V>FuuXwW?NiRp%A(Kn(fB-O14++6Z{(d8pO~4XFeq2c=&6@@7vGI z?7J3(nm3DW5bk~u5WYc0vAQ`gWfr@HoTq`A-Bs@n5d;1+(WSw4`4{{*KW4`<^It|BbbN zmRZbp{G#-g@U$g&rMkcEnj@Wg{rQ)zmMbsiBzgUO_QmvAUQh^kMk%5u1u7Rc?Tp_QqTm9c@gfq|8Q zfn558%_tgj^HVa@DsgMbx6y1$ literal 0 HcmV?d00001 diff --git a/sprites/s_node_array_zip/s_node_array_zip.yy b/sprites/s_node_array_zip/s_node_array_zip.yy new file mode 100644 index 000000000..d9f91aa95 --- /dev/null +++ b/sprites/s_node_array_zip/s_node_array_zip.yy @@ -0,0 +1,74 @@ +{ + "resourceType": "GMSprite", + "resourceVersion": "1.0", + "name": "s_node_array_zip", + "bbox_bottom": 61, + "bbox_left": 0, + "bbox_right": 63, + "bbox_top": 2, + "bboxMode": 0, + "collisionKind": 1, + "collisionTolerance": 0, + "DynamicTexturePage": false, + "edgeFiltering": false, + "For3D": false, + "frames": [ + {"resourceType":"GMSpriteFrame","resourceVersion":"1.1","name":"48ee54bd-54d6-4f20-9848-4d25dbef1511",}, + ], + "gridX": 0, + "gridY": 0, + "height": 64, + "HTile": false, + "layers": [ + {"resourceType":"GMImageLayer","resourceVersion":"1.0","name":"fa3b4a6e-2119-408a-b47a-d44e1d4ac7ab","blendMode":0,"displayName":"default","isLocked":false,"opacity":100.0,"visible":true,}, + ], + "nineSlice": null, + "origin": 4, + "parent": { + "name": "array", + "path": "folders/nodes/icons/value/array.yy", + }, + "preMultiplyAlpha": false, + "sequence": { + "resourceType": "GMSequence", + "resourceVersion": "1.4", + "name": "s_node_array_zip", + "autoRecord": true, + "backdropHeight": 768, + "backdropImageOpacity": 0.5, + "backdropImagePath": "", + "backdropWidth": 1366, + "backdropXOffset": 0.0, + "backdropYOffset": 0.0, + "events": {"resourceType":"KeyframeStore","resourceVersion":"1.0","Keyframes":[],}, + "eventStubScript": null, + "eventToFunction": {}, + "length": 1.0, + "lockOrigin": false, + "moments": {"resourceType":"KeyframeStore","resourceVersion":"1.0","Keyframes":[],}, + "playback": 1, + "playbackSpeed": 30.0, + "playbackSpeedType": 0, + "showBackdrop": true, + "showBackdropImage": false, + "timeUnits": 1, + "tracks": [ + {"resourceType":"GMSpriteFramesTrack","resourceVersion":"1.0","name":"frames","builtinName":0,"events":[],"inheritsTrackColour":true,"interpolation":1,"isCreationTrack":false,"keyframes":{"resourceType":"KeyframeStore","resourceVersion":"1.0","Keyframes":[ + {"resourceType":"Keyframe","resourceVersion":"1.0","Channels":{"0":{"resourceType":"SpriteFrameKeyframe","resourceVersion":"1.0","Id":{"name":"48ee54bd-54d6-4f20-9848-4d25dbef1511","path":"sprites/s_node_array_zip/s_node_array_zip.yy",},},},"Disabled":false,"id":"7d176fe9-021c-4561-898b-2d3669881999","IsCreationKey":false,"Key":0.0,"Length":1.0,"Stretch":false,}, + ],},"modifiers":[],"spriteId":null,"trackColour":0,"tracks":[],"traits":0,}, + ], + "visibleRange": null, + "volume": 1.0, + "xorigin": 32, + "yorigin": 32, + }, + "swatchColours": null, + "swfPrecision": 2.525, + "textureGroupId": { + "name": "Default", + "path": "texturegroups/Default", + }, + "type": 0, + "VTile": false, + "width": 64, +} \ No newline at end of file diff --git a/sprites/s_node_text_length/6835fcb1-d198-40d6-be02-a700ad634332.png b/sprites/s_node_text_length/6835fcb1-d198-40d6-be02-a700ad634332.png new file mode 100644 index 0000000000000000000000000000000000000000..740051bb7016ef30ca88aeb49f11efee7d125c3e GIT binary patch literal 1067 zcmeAS@N?(olHy`uVBq!ia0vp^4j|0I1|(Ny7TyC=3dtTpz6=aiY77hwEes65fI|H*Yfq_}h)5S5Q;?~<)wneuM z1X|}CzwFg}d1j8n8BQQ^iuZ}v++*$w@*k`ScAtOX9H-LV2F=SC)j6)Frv)dx3=sI| z5qQ((iFvakV^jB2<1)seeF{oFGs7?Oc^GplylpU<%z&F&#TfVh=*DL;w^EXY6c`J1 z{~l0V%-`tAkjcJ8axX*dq=ZANkE>W0JSo!Yy_>?YTXTBL>(tZF6kVQZcXhn$T%lwx zDwxV>t+41$(R!sthZ4&VUw1CM{jIj{*|y(KZpK~eDowr(z6a7I6`LN_DXw8EIm>vS zVOx!fW|hzN3;Q0}Hr#fYum0|Ow*+Gu!#jpOhwIkdll;4GLGpU-^9*@6?wu>TtA0SH zOi-So=Ee)Vwj3>dwIOr%uj2mwbDbAFGh&{=e4{{-!Cv?8 z?sE;*rz={Q&M&%?@Avn8L3>heHji$zrgTrQq3F%^3%hcPf2Mu9QdqN|f$P`$+RUBX zo<7!$%bRqfF012UjiQ0MTpjz|5WNM$4|5tmURIV{)3xP#G{fZxPFrQEHi3k^${#zI z#=jIe5MydrDtb`8VH3xtEvX#q&u?UUl4Je6-N-qQ+nuS|_L+Ik_K&8Cx6A6S^`c#D zx6Nj(R;=;Pc5*3QGWVSI!9y48jvklwJJ0;>@VO<2CK_KiW?M(V!M%Oz7BP>^?wB2(KV$99eW&~SMcPm9 zd{%gBAJZJu-_i@ODmC7lr^R47?RD>#=H`u2XBK>RWqlxay0liKp>KIw`S+H_vgk)^ z#JCP9UtjlgXWD^8p`83&{X)AXZn387i~nm_RWbfqe|WX4+S>;XOa8Jj?DMRyQ@UrS zp3K{5o-F<#yjX~)-QL_K#R1)){A>XLnTpTxM52lM$#!T#d2kSFyhKf4kB( z43)3%{4Kup|5#Bh(~nzOnzJS!e$V)8YQ#t1=SQ<9GOgGc6Q0NDc5DjEQrQV?|H*Yfq_}h)5S5Q;?~<)wneuM z1X|}CzwFg}d1j8n8BQQ^iuZ}v++*$w@*k`ScAtOX9H-LV2F=SC)j6)Frv)dx3=sI| z5qQ((iFvakV^jB2<1)seeF{oFGs7?Oc^GplylpU<%z&F&#TfVh=*DL;w^EXY6c`J1 z{~l0V%-`tAkjcJ8axX*dq=ZANkE>W0JSo!Yy_>?YTXTBL>(tZF6kVQZcXhn$T%lwx zDwxV>t+41$(R!sthZ4&VUw1CM{jIj{*|y(KZpK~eDowr(z6a7I6`LN_DXw8EIm>vS zVOx!fW|hzN3;Q0}Hr#fYum0|Ow*+Gu!#jpOhwIkdll;4GLGpU-^9*@6?wu>TtA0SH zOi-So=Ee)Vwj3>dwIOr%uj2mwbDbAFGh&{=e4{{-!Cv?8 z?sE;*rz={Q&M&%?@Avn8L3>heHji$zrgTrQq3F%^3%hcPf2Mu9QdqN|f$P`$+RUBX zo<7!$%bRqfF012UjiQ0MTpjz|5WNM$4|5tmURIV{)3xP#G{fZxPFrQEHi3k^${#zI z#=jIe5MydrDtb`8VH3xtEvX#q&u?UUl4Je6-N-qQ+nuS|_L+Ik_K&8Cx6A6S^`c#D zx6Nj(R;=;Pc5*3QGWVSI!9y48jvklwJJ0;>@VO<2CK_KiW?M(V!M%Oz7BP>^?wB2(KV$99eW&~SMcPm9 zd{%gBAJZJu-_i@ODmC7lr^R47?RD>#=H`u2XBK>RWqlxay0liKp>KIw`S+H_vgk)^ z#JCP9UtjlgXWD^8p`83&{X)AXZn387i~nm_RWbfqe|WX4+S>;XOa8Jj?DMRyQ@UrS zp3K{5o-F<#yjX~)-QL_K#R1)){A>XLnTpTxM52lM$#!T#d2kSFyhKf4kB( z43)3%{4Kup|5#Bh(~nzOnzJS!e$V)8YQ#t1=SQ<9GOgGc6Q0NDc5DjEQrQV?","resourceVersion":"1.0","Keyframes":[],}, + "eventStubScript": null, + "eventToFunction": {}, + "length": 1.0, + "lockOrigin": false, + "moments": {"resourceType":"KeyframeStore","resourceVersion":"1.0","Keyframes":[],}, + "playback": 1, + "playbackSpeed": 30.0, + "playbackSpeedType": 0, + "showBackdrop": true, + "showBackdropImage": false, + "timeUnits": 1, + "tracks": [ + {"resourceType":"GMSpriteFramesTrack","resourceVersion":"1.0","name":"frames","builtinName":0,"events":[],"inheritsTrackColour":true,"interpolation":1,"isCreationTrack":false,"keyframes":{"resourceType":"KeyframeStore","resourceVersion":"1.0","Keyframes":[ + {"resourceType":"Keyframe","resourceVersion":"1.0","Channels":{"0":{"resourceType":"SpriteFrameKeyframe","resourceVersion":"1.0","Id":{"name":"6835fcb1-d198-40d6-be02-a700ad634332","path":"sprites/s_node_text_length/s_node_text_length.yy",},},},"Disabled":false,"id":"2daca3b0-8e99-4cf9-a7d7-a44846386b1d","IsCreationKey":false,"Key":0.0,"Length":1.0,"Stretch":false,}, + ],},"modifiers":[],"spriteId":null,"trackColour":0,"tracks":[],"traits":0,}, + ], + "visibleRange": null, + "volume": 1.0, + "xorigin": 32, + "yorigin": 32, + }, + "swatchColours": null, + "swfPrecision": 2.525, + "textureGroupId": { + "name": "Default", + "path": "texturegroups/Default", + }, + "type": 0, + "VTile": false, + "width": 64, +} \ No newline at end of file