- [Draw Text] Add letter spacing, line height properties.

- [Draw Text] Improve multiline rendering.
- [Draw Text] Add path property.
This commit is contained in:
MakhamDev 2023-10-11 10:17:49 +07:00
parent 78da868ff0
commit 4e0c1af946
6 changed files with 346 additions and 207 deletions

View File

@ -144,7 +144,7 @@ event_inherited();
return; return;
} }
if(category == NODE_CATEGORY) { if(category == NODE_CATEGORY && _node.show_in_recent) {
array_remove(global.RECENT_NODES, _node.node); array_remove(global.RECENT_NODES, _node.node);
array_insert(global.RECENT_NODES, 0, _node.node); array_insert(global.RECENT_NODES, 0, _node.node);
if(array_length(global.RECENT_NODES) > 20) if(array_length(global.RECENT_NODES) > 20)
@ -341,7 +341,9 @@ event_inherited();
var _nodeIndex = global.FAV_NODES[i]; var _nodeIndex = global.FAV_NODES[i];
if(!ds_map_exists(ALL_NODES, _nodeIndex)) continue; if(!ds_map_exists(ALL_NODES, _nodeIndex)) continue;
ds_list_add(_list, ALL_NODES[? _nodeIndex]); var _node = ALL_NODES[? _nodeIndex];
if(_node.show_in_recent)
ds_list_add(_list, _node);
} }
ds_list_add(_list, "Recents"); ds_list_add(_list, "Recents");
@ -349,7 +351,9 @@ event_inherited();
var _nodeIndex = global.RECENT_NODES[i]; var _nodeIndex = global.RECENT_NODES[i];
if(!ds_map_exists(ALL_NODES, _nodeIndex)) continue; if(!ds_map_exists(ALL_NODES, _nodeIndex)) continue;
ds_list_add(_list, ALL_NODES[? _nodeIndex]); var _node = ALL_NODES[? _nodeIndex];
if(_node.show_in_recent)
ds_list_add(_list, _node);
} }
} }

View File

@ -182,8 +182,8 @@ function Node_Canvas(_x, _y, _group = noone) : Node(_x, _y, _group) constructor
mouse_cur_y = 0; mouse_cur_y = 0;
mouse_pre_x = 0; mouse_pre_x = 0;
mouse_pre_y = 0; mouse_pre_y = 0;
mouse_pre_draw_x = 0; mouse_pre_draw_x = -1;
mouse_pre_draw_y = 0; mouse_pre_draw_y = -1;
mouse_holding = false; mouse_holding = false;
@ -353,6 +353,11 @@ function Node_Canvas(_x, _y, _group = noone) : Node(_x, _y, _group) constructor
} #endregion } #endregion
function draw_line_size(_x0, _y0, _x1, _y1, _siz, _brush) { #region function draw_line_size(_x0, _y0, _x1, _y1, _siz, _brush) { #region
if(_x1 > _x0) _x0--;
if(_y1 > _y0) _y0--;
if(_y1 < _y0) _y1--;
if(_x1 < _x0) _x1--;
if(_siz == 1 && _brush == -1) if(_siz == 1 && _brush == -1)
draw_line(_x0, _y0, _x1, _y1); draw_line(_x0, _y0, _x1, _y1);
else { else {
@ -463,7 +468,7 @@ function Node_Canvas(_x, _y, _group = noone) : Node(_x, _y, _group) constructor
} #endregion } #endregion
function ff_fillable(colorBase, colorFill, _x, _y, _thres) { #region function ff_fillable(colorBase, colorFill, _x, _y, _thres) { #region
var d = color_diff(colorBase, get_color_buffer(_x, _y), true); var d = color_diff(colorBase, get_color_buffer(_x, _y), true, true);
return d <= _thres && d != colorFill; return d <= _thres && d != colorFill;
} #endregion } #endregion
@ -739,7 +744,7 @@ function Node_Canvas(_x, _y, _group = noone) : Node(_x, _y, _group) constructor
} }
#endregion #endregion
} else if(isUsingTool("Pencil") || isUsingTool("Eraser")) { #region } else if(isUsingTool("Pencil") || isUsingTool("Eraser")) { #region
if(key_mod_press(SHIFT) && key_mod_press(CTRL)) { if(mouse_pre_draw_x > -1 && mouse_pre_draw_y > -1 && key_mod_press(SHIFT) && key_mod_press(CTRL)) {
var aa = point_direction(mouse_pre_draw_x, mouse_pre_draw_y, mouse_cur_x, mouse_cur_y); var aa = point_direction(mouse_pre_draw_x, mouse_pre_draw_y, mouse_cur_x, mouse_cur_y);
var dd = point_distance(mouse_pre_draw_x, mouse_pre_draw_y, mouse_cur_x, mouse_cur_y); var dd = point_distance(mouse_pre_draw_x, mouse_pre_draw_y, mouse_cur_x, mouse_cur_y);
var _a = round(aa / 45) * 45; var _a = round(aa / 45) * 45;
@ -757,7 +762,7 @@ function Node_Canvas(_x, _y, _group = noone) : Node(_x, _y, _group) constructor
surface_reset_shader(); surface_reset_shader();
mouse_holding = true; mouse_holding = true;
if(key_mod_press(SHIFT)) { if(mouse_pre_draw_x > -1 && mouse_pre_draw_y > -1 && key_mod_press(SHIFT)) {
surface_set_shader(drawing_surface, noone, true, BLEND.alpha); surface_set_shader(drawing_surface, noone, true, BLEND.alpha);
draw_line_size(mouse_pre_draw_x, mouse_pre_draw_y, mouse_cur_x, mouse_cur_y, _siz, _brush); draw_line_size(mouse_pre_draw_x, mouse_pre_draw_y, mouse_cur_x, mouse_cur_y, _siz, _brush);
surface_reset_shader(); surface_reset_shader();
@ -911,15 +916,16 @@ function Node_Canvas(_x, _y, _group = noone) : Node(_x, _y, _group) constructor
draw_surface_safe(selection_mask, sel_x0, sel_y0); draw_surface_safe(selection_mask, sel_x0, sel_y0);
} }
} else if(isUsingTool("Pencil") || isUsingTool("Eraser")) { } else if(isUsingTool("Pencil") || isUsingTool("Eraser")) {
if(isUsingTool("Eraser")) draw_set_color(c_white);
if(brush_sizing) { if(brush_sizing) {
draw_point_size(brush_sizing_dx, brush_sizing_dy, _siz, _brush); draw_point_size(brush_sizing_dx, brush_sizing_dy, _siz, _brush);
} else if(mouse_holding) { } else {
if(isUsingTool("Eraser")) draw_set_color(c_white); if(mouse_pre_draw_x > -1 && mouse_pre_draw_y > -1 && key_mod_press(SHIFT))
draw_line_size(mouse_pre_draw_x, mouse_pre_draw_y, mouse_cur_x, mouse_cur_y, _siz, _brush);
if(key_mod_press(SHIFT)) draw_line_size(mouse_pre_draw_x, mouse_pre_draw_y, mouse_cur_x, mouse_cur_y, _siz, _brush); else
else draw_point_size(mouse_cur_x, mouse_cur_y, _siz, _brush); draw_point_size(mouse_cur_x, mouse_cur_y, _siz, _brush);
} else }
draw_point_size(mouse_cur_x, mouse_cur_y, _siz, _brush);
} else if(isUsingTool("Rectangle")) { } else if(isUsingTool("Rectangle")) {
if(brush_sizing) if(brush_sizing)
draw_point_size(brush_sizing_dx, brush_sizing_dy, _siz, _brush); draw_point_size(brush_sizing_dx, brush_sizing_dy, _siz, _brush);

View File

@ -83,7 +83,7 @@ function Node_Path(_x, _y, _group = noone) : Node(_x, _y, _group) constructor {
transform_mx = 0; transform_my = 0; transform_mx = 0; transform_my = 0;
#endregion #endregion
static resetDisplayList = function() { static resetDisplayList = function() { #region
recordAction(ACTION_TYPE.var_modify, self, [ array_clone(input_display_list), "input_display_list" ]); recordAction(ACTION_TYPE.var_modify, self, [ array_clone(input_display_list), "input_display_list" ]);
input_display_list = [ input_display_list = [
@ -93,7 +93,7 @@ function Node_Path(_x, _y, _group = noone) : Node(_x, _y, _group) constructor {
for( var i = input_fix_len, n = ds_list_size(inputs); i < n; i++ ) for( var i = input_fix_len, n = ds_list_size(inputs); i < n; i++ )
array_push(input_display_list, i); array_push(input_display_list, i);
} } #endregion
static createNewInput = function(_x = 0, _y = 0, _dxx = 0, _dxy = 0, _dyx = 0, _dyy = 0) { #region static createNewInput = function(_x = 0, _y = 0, _dxx = 0, _dxy = 0, _dyx = 0, _dyy = 0) { #region
var index = ds_list_size(inputs); var index = ds_list_size(inputs);
@ -885,11 +885,13 @@ function Node_Path(_x, _y, _group = noone) : Node(_x, _y, _group) constructor {
if(ds_map_exists(cached_pos, _dist)) if(ds_map_exists(cached_pos, _dist))
return cached_pos[? _dist].clone(); return cached_pos[? _dist].clone();
var _oDist = _dist;
var loop = getInputData(1); var loop = getInputData(1);
var rond = getInputData(3); var rond = getInputData(3);
if(!is_real(rond)) rond = false; if(!is_real(rond)) rond = false;
if(loop) _dist = safe_mod(_dist, lengthTotal, MOD_NEG.wrap);
var _oDist = _dist;
var ansize = array_length(lengths); var ansize = array_length(lengths);
var amo = ds_list_size(inputs) - input_fix_len; var amo = ds_list_size(inputs) - input_fix_len;

View File

@ -9,6 +9,8 @@ function NodeObject(_name, _spr, _node, _create, tags = []) constructor { #regio
tooltip_spr = noone; tooltip_spr = noone;
deprecated = false; deprecated = false;
show_in_recent = true;
var pth = DIRECTORY + "Nodes/tooltip/" + node + ".png"; var pth = DIRECTORY + "Nodes/tooltip/" + node + ".png";
if(file_exists(pth)) if(file_exists(pth))
tooltip_spr = sprite_add(pth, 0, false, false, 0, 0); tooltip_spr = sprite_add(pth, 0, false, false, 0, 0);
@ -31,6 +33,11 @@ function NodeObject(_name, _spr, _node, _create, tags = []) constructor { #regio
return self; return self;
} }
static hideRecent = function() {
show_in_recent = false;
return self;
}
static getName = function() { return __txt_node_name(node, name); } static getName = function() { return __txt_node_name(node, name); }
static getTooltip = function() { return __txt_node_tooltip(node, tooltip); } static getTooltip = function() { return __txt_node_tooltip(node, tooltip); }
@ -52,10 +59,10 @@ function NodeObject(_name, _spr, _node, _create, tags = []) constructor { #regio
#region nodes #region nodes
globalvar ALL_NODES, ALL_NODE_LIST, NODE_CATEGORY, NODE_PAGE_DEFAULT, NODE_PB_CATEGORY, NODE_PCX_CATEGORY; globalvar ALL_NODES, ALL_NODE_LIST, NODE_CATEGORY, NODE_PAGE_DEFAULT, NODE_PB_CATEGORY, NODE_PCX_CATEGORY;
ALL_NODES = ds_map_create(); ALL_NODES = ds_map_create();
ALL_NODE_LIST = ds_list_create(); ALL_NODE_LIST = ds_list_create();
NODE_CATEGORY = ds_list_create(); NODE_CATEGORY = ds_list_create();
NODE_PB_CATEGORY = ds_list_create(); NODE_PB_CATEGORY = ds_list_create();
NODE_PCX_CATEGORY = ds_list_create(); NODE_PCX_CATEGORY = ds_list_create();
function nodeBuild(_name, _x, _y, _group = PANEL_GRAPH.getCurrentContext()) { #region function nodeBuild(_name, _x, _y, _group = PANEL_GRAPH.getCurrentContext()) { #region
@ -107,139 +114,139 @@ function NodeObject(_name, _spr, _node, _create, tags = []) constructor { #regio
var group = ds_list_create(); #region var group = ds_list_create(); #region
addNodeCatagory("Group", group, ["Node_Group"]); addNodeCatagory("Group", group, ["Node_Group"]);
ds_list_add(group, "Groups"); ds_list_add(group, "Groups");
addNodeObject(group, "Input", s_node_group_input, "Node_Group_Input", [1, Node_Group_Input]); addNodeObject(group, "Input", s_node_group_input, "Node_Group_Input", [1, Node_Group_Input]).hideRecent();
addNodeObject(group, "Output", s_node_group_output, "Node_Group_Output", [1, Node_Group_Output]); addNodeObject(group, "Output", s_node_group_output, "Node_Group_Output", [1, Node_Group_Output]).hideRecent();
addNodeObject(group, "Thumbnail", s_node_group_thumbnail, "Node_Group_Thumbnail", [1, Node_Group_Thumbnail]); addNodeObject(group, "Thumbnail", s_node_group_thumbnail, "Node_Group_Thumbnail", [1, Node_Group_Thumbnail]).hideRecent();
#endregion #endregion
var iter = ds_list_create(); #region var iter = ds_list_create(); #region
addNodeCatagory("Loop", iter, ["Node_Iterate"]); addNodeCatagory("Loop", iter, ["Node_Iterate"]);
ds_list_add(iter, "Groups"); ds_list_add(iter, "Groups");
addNodeObject(iter, "Input", s_node_loop_input, "Node_Iterator_Input", [1, Node_Iterator_Input]); addNodeObject(iter, "Input", s_node_loop_input, "Node_Iterator_Input", [1, Node_Iterator_Input]).hideRecent();
addNodeObject(iter, "Output", s_node_loop_output, "Node_Iterator_Output", [1, Node_Iterator_Output]); addNodeObject(iter, "Output", s_node_loop_output, "Node_Iterator_Output", [1, Node_Iterator_Output]).hideRecent();
addNodeObject(iter, "Thumbnail", s_node_group_thumbnail, "Node_Group_Thumbnail", [1, Node_Group_Thumbnail]); addNodeObject(iter, "Thumbnail", s_node_group_thumbnail, "Node_Group_Thumbnail", [1, Node_Group_Thumbnail]).hideRecent();
ds_list_add(iter, "Loops"); ds_list_add(iter, "Loops");
addNodeObject(iter, "Index", s_node_iterator_index, "Node_Iterator_Index", [1, Node_Iterator_Index]); addNodeObject(iter, "Index", s_node_iterator_index, "Node_Iterator_Index", [1, Node_Iterator_Index]).hideRecent();
addNodeObject(iter, "Loop amount", s_node_iterator_amount, "Node_Iterator_Length", [1, Node_Iterator_Length]); addNodeObject(iter, "Loop amount", s_node_iterator_amount, "Node_Iterator_Length", [1, Node_Iterator_Length]).hideRecent();
#endregion #endregion
var itere = ds_list_create(); #region var itere = ds_list_create(); #region
addNodeCatagory("Loop", itere, ["Node_Iterate_Each"]); addNodeCatagory("Loop", itere, ["Node_Iterate_Each"]);
ds_list_add(itere, "Groups"); ds_list_add(itere, "Groups");
addNodeObject(itere, "Input", s_node_group_input, "Node_Group_Input", [1, Node_Group_Input]); addNodeObject(itere, "Input", s_node_group_input, "Node_Group_Input", [1, Node_Group_Input]).hideRecent();
addNodeObject(itere, "Output", s_node_group_output, "Node_Group_Output", [1, Node_Group_Output]); addNodeObject(itere, "Output", s_node_group_output, "Node_Group_Output", [1, Node_Group_Output]).hideRecent();
addNodeObject(itere, "Thumbnail", s_node_group_thumbnail, "Node_Group_Thumbnail", [1, Node_Group_Thumbnail]); addNodeObject(itere, "Thumbnail", s_node_group_thumbnail, "Node_Group_Thumbnail", [1, Node_Group_Thumbnail]).hideRecent();
ds_list_add(itere, "Loops"); ds_list_add(itere, "Loops");
addNodeObject(itere, "Index", s_node_iterator_index, "Node_Iterator_Index", [1, Node_Iterator_Index]); addNodeObject(itere, "Index", s_node_iterator_index, "Node_Iterator_Index", [1, Node_Iterator_Index]).hideRecent();
addNodeObject(itere, "Array Length", s_node_iterator_length, "Node_Iterator_Each_Length", [1, Node_Iterator_Each_Length]); addNodeObject(itere, "Array Length", s_node_iterator_length, "Node_Iterator_Each_Length", [1, Node_Iterator_Each_Length]).hideRecent();
#endregion #endregion
var filter = ds_list_create(); #region var filter = ds_list_create(); #region
addNodeCatagory("Filter", filter, ["Node_Iterate_Filter"]); addNodeCatagory("Filter", filter, ["Node_Iterate_Filter"]);
ds_list_add(filter, "Groups"); ds_list_add(filter, "Groups");
addNodeObject(filter, "Input", s_node_group_input, "Node_Group_Input", [1, Node_Group_Input]); addNodeObject(filter, "Input", s_node_group_input, "Node_Group_Input", [1, Node_Group_Input]).hideRecent();
addNodeObject(filter, "Output", s_node_group_output, "Node_Group_Output", [1, Node_Group_Output]); addNodeObject(filter, "Output", s_node_group_output, "Node_Group_Output", [1, Node_Group_Output]).hideRecent();
addNodeObject(filter, "Thumbnail", s_node_group_thumbnail, "Node_Group_Thumbnail", [1, Node_Group_Thumbnail]); addNodeObject(filter, "Thumbnail", s_node_group_thumbnail, "Node_Group_Thumbnail", [1, Node_Group_Thumbnail]).hideRecent();
ds_list_add(filter, "Loops"); ds_list_add(filter, "Loops");
addNodeObject(filter, "Index", s_node_iterator_index, "Node_Iterator_Index", [1, Node_Iterator_Index]); addNodeObject(filter, "Index", s_node_iterator_index, "Node_Iterator_Index", [1, Node_Iterator_Index]).hideRecent();
addNodeObject(filter, "Array Length", s_node_iterator_length, "Node_Iterator_Each_Length", [1, Node_Iterator_Each_Length]); addNodeObject(filter, "Array Length", s_node_iterator_length, "Node_Iterator_Each_Length", [1, Node_Iterator_Each_Length]).hideRecent();
#endregion #endregion
var feed = ds_list_create(); #region var feed = ds_list_create(); #region
addNodeCatagory("Feedback", feed, ["Node_Feedback"]); addNodeCatagory("Feedback", feed, ["Node_Feedback"]);
ds_list_add(feed, "Groups"); ds_list_add(feed, "Groups");
addNodeObject(feed, "Input", s_node_feedback_input, "Node_Feedback_Input", [1, Node_Feedback_Input]); addNodeObject(feed, "Input", s_node_feedback_input, "Node_Feedback_Input", [1, Node_Feedback_Input]).hideRecent();
addNodeObject(feed, "Output", s_node_feedback_output, "Node_Feedback_Output", [1, Node_Feedback_Output]); addNodeObject(feed, "Output", s_node_feedback_output, "Node_Feedback_Output", [1, Node_Feedback_Output]).hideRecent();
addNodeObject(feed, "Thumbnail", s_node_group_thumbnail, "Node_Group_Thumbnail", [1, Node_Group_Thumbnail]); addNodeObject(feed, "Thumbnail", s_node_group_thumbnail, "Node_Group_Thumbnail", [1, Node_Group_Thumbnail]).hideRecent();
#endregion #endregion
var vfx = ds_list_create(); #region var vfx = ds_list_create(); #region
addNodeCatagory("VFX", vfx, ["Node_VFX_Group"]); addNodeCatagory("VFX", vfx, ["Node_VFX_Group"]);
ds_list_add(vfx, "Groups"); ds_list_add(vfx, "Groups");
addNodeObject(vfx, "Input", s_node_vfx_input, "Node_Group_Input", [1, Node_Group_Input]); addNodeObject(vfx, "Input", s_node_vfx_input, "Node_Group_Input", [1, Node_Group_Input]).hideRecent();
addNodeObject(vfx, "Output", s_node_vfx_output, "Node_Group_Output", [1, Node_Group_Output]); addNodeObject(vfx, "Output", s_node_vfx_output, "Node_Group_Output", [1, Node_Group_Output]).hideRecent();
addNodeObject(vfx, "Renderer", s_node_vfx_render_output, "Node_VFX_Renderer_Output", [1, Node_VFX_Renderer_Output]); addNodeObject(vfx, "Renderer", s_node_vfx_render_output, "Node_VFX_Renderer_Output", [1, Node_VFX_Renderer_Output]).hideRecent();
ds_list_add(vfx, "VFXs"); ds_list_add(vfx, "VFXs");
addNodeObject(vfx, "Spawner", s_node_vfx_spawn, "Node_VFX_Spawner", [1, Node_VFX_Spawner]); addNodeObject(vfx, "Spawner", s_node_vfx_spawn, "Node_VFX_Spawner", [1, Node_VFX_Spawner]).hideRecent();
addNodeObject(vfx, "Renderer", s_node_vfx_render, "Node_VFX_Renderer", [1, Node_VFX_Renderer]); addNodeObject(vfx, "Renderer", s_node_vfx_render, "Node_VFX_Renderer", [1, Node_VFX_Renderer]).hideRecent();
ds_list_add(vfx, "Affectors"); ds_list_add(vfx, "Affectors");
addNodeObject(vfx, "Accelerate", s_node_vfx_accel, "Node_VFX_Accelerate", [1, Node_VFX_Accelerate]); addNodeObject(vfx, "Accelerate", s_node_vfx_accel, "Node_VFX_Accelerate", [1, Node_VFX_Accelerate]).hideRecent();
addNodeObject(vfx, "Destroy", s_node_vfx_destroy, "Node_VFX_Destroy", [1, Node_VFX_Destroy]); addNodeObject(vfx, "Destroy", s_node_vfx_destroy, "Node_VFX_Destroy", [1, Node_VFX_Destroy]).hideRecent();
addNodeObject(vfx, "Attract", s_node_vfx_attract, "Node_VFX_Attract", [1, Node_VFX_Attract]); addNodeObject(vfx, "Attract", s_node_vfx_attract, "Node_VFX_Attract", [1, Node_VFX_Attract]).hideRecent();
addNodeObject(vfx, "Wind", s_node_vfx_wind, "Node_VFX_Wind", [1, Node_VFX_Wind]); addNodeObject(vfx, "Wind", s_node_vfx_wind, "Node_VFX_Wind", [1, Node_VFX_Wind]).hideRecent();
addNodeObject(vfx, "Vortex", s_node_vfx_vortex, "Node_VFX_Vortex", [1, Node_VFX_Vortex]); addNodeObject(vfx, "Vortex", s_node_vfx_vortex, "Node_VFX_Vortex", [1, Node_VFX_Vortex]).hideRecent();
addNodeObject(vfx, "Turbulence", s_node_vfx_turb, "Node_VFX_Turbulence", [1, Node_VFX_Turbulence]); addNodeObject(vfx, "Turbulence", s_node_vfx_turb, "Node_VFX_Turbulence", [1, Node_VFX_Turbulence]).hideRecent();
addNodeObject(vfx, "Repel", s_node_vfx_repel, "Node_VFX_Repel", [1, Node_VFX_Repel]); addNodeObject(vfx, "Repel", s_node_vfx_repel, "Node_VFX_Repel", [1, Node_VFX_Repel]).hideRecent();
ds_list_add(vfx, "Instance control"); ds_list_add(vfx, "Instance control");
addNodeObject(vfx, "VFX Variable", s_node_vfx_variable, "Node_VFX_Variable", [1, Node_VFX_Variable]).setVersion(1120); addNodeObject(vfx, "VFX Variable", s_node_vfx_variable, "Node_VFX_Variable", [1, Node_VFX_Variable]).hideRecent().setVersion(1120);
addNodeObject(vfx, "VFX Override", s_node_vfx_override, "Node_VFX_Override", [1, Node_VFX_Override]).setVersion(1120); addNodeObject(vfx, "VFX Override", s_node_vfx_override, "Node_VFX_Override", [1, Node_VFX_Override]).hideRecent().setVersion(1120);
#endregion #endregion
var rigidSim = ds_list_create(); #region var rigidSim = ds_list_create(); #region
addNodeCatagory("RigidSim", rigidSim, ["Node_Rigid_Group"]); addNodeCatagory("RigidSim", rigidSim, ["Node_Rigid_Group"]);
ds_list_add(rigidSim, "Group"); ds_list_add(rigidSim, "Group");
addNodeObject(rigidSim, "Input", s_node_group_input, "Node_Group_Input", [1, Node_Group_Input]); addNodeObject(rigidSim, "Input", s_node_group_input, "Node_Group_Input", [1, Node_Group_Input]).hideRecent();
addNodeObject(rigidSim, "Output", s_node_group_output, "Node_Group_Output", [1, Node_Group_Output]); addNodeObject(rigidSim, "Output", s_node_group_output, "Node_Group_Output", [1, Node_Group_Output]).hideRecent();
addNodeObject(rigidSim, "Render", s_node_rigidSim_render_output, "Node_Rigid_Render_Output", [1, Node_Rigid_Render_Output]); addNodeObject(rigidSim, "Render", s_node_rigidSim_render_output, "Node_Rigid_Render_Output", [1, Node_Rigid_Render_Output]).hideRecent();
ds_list_add(rigidSim, "RigidSim"); ds_list_add(rigidSim, "RigidSim");
addNodeObject(rigidSim, "Object", s_node_rigidSim_object, "Node_Rigid_Object", [1, Node_Rigid_Object]).setVersion(1110); addNodeObject(rigidSim, "Object", s_node_rigidSim_object, "Node_Rigid_Object", [1, Node_Rigid_Object]).hideRecent().setVersion(1110);
addNodeObject(rigidSim, "Object Spawner", s_node_rigidSim_object_spawner, "Node_Rigid_Object_Spawner", [1, Node_Rigid_Object_Spawner]).setVersion(1110); addNodeObject(rigidSim, "Object Spawner", s_node_rigidSim_object_spawner, "Node_Rigid_Object_Spawner", [1, Node_Rigid_Object_Spawner]).hideRecent().setVersion(1110);
addNodeObject(rigidSim, "Render", s_node_rigidSim_renderer, "Node_Rigid_Render", [1, Node_Rigid_Render]).setVersion(1110); addNodeObject(rigidSim, "Render", s_node_rigidSim_renderer, "Node_Rigid_Render", [1, Node_Rigid_Render]).hideRecent().setVersion(1110);
addNodeObject(rigidSim, "Apply Force", s_node_rigidSim_force, "Node_Rigid_Force_Apply", [1, Node_Rigid_Force_Apply]).setVersion(1110); addNodeObject(rigidSim, "Apply Force", s_node_rigidSim_force, "Node_Rigid_Force_Apply", [1, Node_Rigid_Force_Apply]).hideRecent().setVersion(1110);
ds_list_add(rigidSim, "Instance control"); ds_list_add(rigidSim, "Instance control");
addNodeObject(rigidSim, "Activate Physics", s_node_rigidSim_activate, "Node_Rigid_Activate", [1, Node_Rigid_Activate]).setVersion(1110); addNodeObject(rigidSim, "Activate Physics", s_node_rigidSim_activate, "Node_Rigid_Activate", [1, Node_Rigid_Activate]).hideRecent().setVersion(1110);
addNodeObject(rigidSim, "Rigidbody Variable", s_node_rigid_variable, "Node_Rigid_Variable", [1, Node_Rigid_Variable]).setVersion(1120); addNodeObject(rigidSim, "Rigidbody Variable", s_node_rigid_variable, "Node_Rigid_Variable", [1, Node_Rigid_Variable]).hideRecent().setVersion(1120);
addNodeObject(rigidSim, "Rigidbody Override", s_node_rigid_override, "Node_Rigid_Override", [1, Node_Rigid_Override]).setVersion(1120); addNodeObject(rigidSim, "Rigidbody Override", s_node_rigid_override, "Node_Rigid_Override", [1, Node_Rigid_Override]).hideRecent().setVersion(1120);
#endregion #endregion
var fluidSim = ds_list_create(); #region var fluidSim = ds_list_create(); #region
addNodeCatagory("FluidSim", fluidSim, ["Node_Fluid_Group"]); addNodeCatagory("FluidSim", fluidSim, ["Node_Fluid_Group"]);
ds_list_add(fluidSim, "Group"); ds_list_add(fluidSim, "Group");
addNodeObject(fluidSim, "Input", s_node_group_input, "Node_Group_Input", [1, Node_Group_Input]); addNodeObject(fluidSim, "Input", s_node_group_input, "Node_Group_Input", [1, Node_Group_Input]).hideRecent();
addNodeObject(fluidSim, "Output", s_node_group_output, "Node_Group_Output", [1, Node_Group_Output]); addNodeObject(fluidSim, "Output", s_node_group_output, "Node_Group_Output", [1, Node_Group_Output]).hideRecent();
addNodeObject(fluidSim, "Render Domain", s_node_fluidSim_render_output, "Node_Fluid_Render_Output", [1, Node_Fluid_Render_Output]).setVersion(11540); addNodeObject(fluidSim, "Render Domain", s_node_fluidSim_render_output, "Node_Fluid_Render_Output", [1, Node_Fluid_Render_Output]).hideRecent().setVersion(11540);
ds_list_add(fluidSim, "Domain"); ds_list_add(fluidSim, "Domain");
addNodeObject(fluidSim, "Fluid Domain", s_node_fluidSim_domain, "Node_Fluid_Domain", [1, Node_Fluid_Domain]).setVersion(1120); addNodeObject(fluidSim, "Fluid Domain", s_node_fluidSim_domain, "Node_Fluid_Domain", [1, Node_Fluid_Domain]).hideRecent().setVersion(1120);
addNodeObject(fluidSim, "Update Domain", s_node_fluidSim_update, "Node_Fluid_Update", [1, Node_Fluid_Update]).setVersion(1120); addNodeObject(fluidSim, "Update Domain", s_node_fluidSim_update, "Node_Fluid_Update", [1, Node_Fluid_Update]).hideRecent().setVersion(1120);
addNodeObject(fluidSim, "Render Domain", s_node_fluidSim_render, "Node_Fluid_Render", [1, Node_Fluid_Render]).setVersion(1120); addNodeObject(fluidSim, "Render Domain", s_node_fluidSim_render, "Node_Fluid_Render", [1, Node_Fluid_Render]).hideRecent().setVersion(1120);
addNodeObject(fluidSim, "Queue Domain", s_node_fluidSim_domain_queue, "Node_Fluid_Domain_Queue", [1, Node_Fluid_Domain_Queue]).setVersion(1120); addNodeObject(fluidSim, "Queue Domain", s_node_fluidSim_domain_queue, "Node_Fluid_Domain_Queue", [1, Node_Fluid_Domain_Queue]).hideRecent().setVersion(1120);
ds_list_add(fluidSim, "Fluid"); ds_list_add(fluidSim, "Fluid");
addNodeObject(fluidSim, "Add Fluid", s_node_fluidSim_add_fluid, "Node_Fluid_Add", [1, Node_Fluid_Add]).setVersion(1120); addNodeObject(fluidSim, "Add Fluid", s_node_fluidSim_add_fluid, "Node_Fluid_Add", [1, Node_Fluid_Add]).hideRecent().setVersion(1120);
addNodeObject(fluidSim, "Apply Velocity", s_node_fluidSim_apply_velocity, "Node_Fluid_Apply_Velocity", [1, Node_Fluid_Apply_Velocity]).setVersion(1120); addNodeObject(fluidSim, "Apply Velocity", s_node_fluidSim_apply_velocity, "Node_Fluid_Apply_Velocity", [1, Node_Fluid_Apply_Velocity]).hideRecent().setVersion(1120);
addNodeObject(fluidSim, "Add Collider", s_node_fluidSim_add_collider, "Node_Fluid_Add_Collider", [1, Node_Fluid_Add_Collider]).setVersion(1120); addNodeObject(fluidSim, "Add Collider", s_node_fluidSim_add_collider, "Node_Fluid_Add_Collider", [1, Node_Fluid_Add_Collider]).hideRecent().setVersion(1120);
addNodeObject(fluidSim, "Vortex", s_node_fluidSim_vortex, "Node_Fluid_Vortex", [1, Node_Fluid_Vortex]).setVersion(1120); addNodeObject(fluidSim, "Vortex", s_node_fluidSim_vortex, "Node_Fluid_Vortex", [1, Node_Fluid_Vortex]).hideRecent().setVersion(1120);
addNodeObject(fluidSim, "Repulse", s_node_fluidSim_repulse, "Node_Fluid_Repulse", [1, Node_Fluid_Repulse]).setVersion(1120); addNodeObject(fluidSim, "Repulse", s_node_fluidSim_repulse, "Node_Fluid_Repulse", [1, Node_Fluid_Repulse]).hideRecent().setVersion(1120);
addNodeObject(fluidSim, "Turbulence", s_node_fluidSim_turbulence, "Node_Fluid_Turbulence", [1, Node_Fluid_Turbulence]).setVersion(1120); addNodeObject(fluidSim, "Turbulence", s_node_fluidSim_turbulence, "Node_Fluid_Turbulence", [1, Node_Fluid_Turbulence]).hideRecent().setVersion(1120);
#endregion #endregion
var strandSim = ds_list_create(); #region var strandSim = ds_list_create(); #region
addNodeCatagory("StrandSim", strandSim, ["Node_Strand_Group"]); addNodeCatagory("StrandSim", strandSim, ["Node_Strand_Group"]);
ds_list_add(strandSim, "Group"); ds_list_add(strandSim, "Group");
addNodeObject(strandSim, "Input", s_node_group_input, "Node_Group_Input", [1, Node_Group_Input]); addNodeObject(strandSim, "Input", s_node_group_input, "Node_Group_Input", [1, Node_Group_Input]).hideRecent();
addNodeObject(strandSim, "Output", s_node_group_output, "Node_Group_Output", [1, Node_Group_Output]); addNodeObject(strandSim, "Output", s_node_group_output, "Node_Group_Output", [1, Node_Group_Output]).hideRecent();
ds_list_add(strandSim, "System"); ds_list_add(strandSim, "System");
addNodeObject(strandSim, "Strand Create", s_node_strandSim_create, "Node_Strand_Create", [1, Node_Strand_Create]).setVersion(1140); addNodeObject(strandSim, "Strand Create", s_node_strandSim_create, "Node_Strand_Create", [1, Node_Strand_Create]).hideRecent().setVersion(1140);
addNodeObject(strandSim, "Strand Update", s_node_strandSim_update, "Node_Strand_Update", [1, Node_Strand_Update]).setVersion(1140); addNodeObject(strandSim, "Strand Update", s_node_strandSim_update, "Node_Strand_Update", [1, Node_Strand_Update]).hideRecent().setVersion(1140);
addNodeObject(strandSim, "Strand Render", s_node_strandSim_render, "Node_Strand_Render", [1, Node_Strand_Render]).setVersion(1140); addNodeObject(strandSim, "Strand Render", s_node_strandSim_render, "Node_Strand_Render", [1, Node_Strand_Render]).hideRecent().setVersion(1140);
addNodeObject(strandSim, "Strand Render Texture", s_node_strandSim_render_texture, "Node_Strand_Render_Texture", [1, Node_Strand_Render_Texture]).setVersion(1140); addNodeObject(strandSim, "Strand Render Texture", s_node_strandSim_render_texture, "Node_Strand_Render_Texture", [1, Node_Strand_Render_Texture]).hideRecent().setVersion(1140);
ds_list_add(strandSim, "Affectors"); ds_list_add(strandSim, "Affectors");
addNodeObject(strandSim, "Strand Gravity", s_node_strandSim_gravity, "Node_Strand_Gravity", [1, Node_Strand_Gravity]).setVersion(1140); addNodeObject(strandSim, "Strand Gravity", s_node_strandSim_gravity, "Node_Strand_Gravity", [1, Node_Strand_Gravity]).hideRecent().setVersion(1140);
addNodeObject(strandSim, "Strand Force Apply", s_node_strandSim_force, "Node_Strand_Force_Apply", [1, Node_Strand_Force_Apply]).setVersion(1140); addNodeObject(strandSim, "Strand Force Apply", s_node_strandSim_force, "Node_Strand_Force_Apply", [1, Node_Strand_Force_Apply]).hideRecent().setVersion(1140);
addNodeObject(strandSim, "Strand Break", s_node_strandSim_break, "Node_Strand_Break", [1, Node_Strand_Break]).setVersion(1140); addNodeObject(strandSim, "Strand Break", s_node_strandSim_break, "Node_Strand_Break", [1, Node_Strand_Break]).hideRecent().setVersion(1140);
addNodeObject(strandSim, "Strand Length Adjust", s_node_strandSim_length, "Node_Strand_Length_Adjust", [1, Node_Strand_Length_Adjust]).setVersion(1140); addNodeObject(strandSim, "Strand Length Adjust", s_node_strandSim_length, "Node_Strand_Length_Adjust", [1, Node_Strand_Length_Adjust]).hideRecent().setVersion(1140);
addNodeObject(strandSim, "Strand Collision", s_node_strandSim_collide, "Node_Strand_Collision", [1, Node_Strand_Collision]).setVersion(1140); addNodeObject(strandSim, "Strand Collision", s_node_strandSim_collide, "Node_Strand_Collision", [1, Node_Strand_Collision]).hideRecent().setVersion(1140);
#endregion #endregion
NODE_PAGE_DEFAULT = ds_list_size(NODE_CATEGORY); NODE_PAGE_DEFAULT = ds_list_size(NODE_CATEGORY);
@ -714,116 +721,116 @@ function NodeObject(_name, _spr, _node, _create, tags = []) constructor { #regio
var pb_draw = ds_list_create(); #region var pb_draw = ds_list_create(); #region
addNodePBCatagory("Draw", pb_draw); addNodePBCatagory("Draw", pb_draw);
ds_list_add(pb_draw, "Fill"); ds_list_add(pb_draw, "Fill");
addNodeObject(pb_draw, "Fill", s_node_pb_draw_fill, "Node_PB_Draw_Fill", [1, Node_PB_Draw_Fill]); addNodeObject(pb_draw, "Fill", s_node_pb_draw_fill, "Node_PB_Draw_Fill", [1, Node_PB_Draw_Fill]).hideRecent();
ds_list_add(pb_draw, "Shape"); ds_list_add(pb_draw, "Shape");
addNodeObject(pb_draw, "Rectangle", s_node_pb_draw_rectangle, "Node_PB_Draw_Rectangle", [1, Node_PB_Draw_Rectangle]); addNodeObject(pb_draw, "Rectangle", s_node_pb_draw_rectangle, "Node_PB_Draw_Rectangle", [1, Node_PB_Draw_Rectangle]).hideRecent();
addNodeObject(pb_draw, "Round Rectangle", s_node_pb_draw_roundrectangle, "Node_PB_Draw_Round_Rectangle", [1, Node_PB_Draw_Round_Rectangle]); addNodeObject(pb_draw, "Round Rectangle", s_node_pb_draw_roundrectangle, "Node_PB_Draw_Round_Rectangle", [1, Node_PB_Draw_Round_Rectangle]).hideRecent();
addNodeObject(pb_draw, "Trapezoid", s_node_pb_draw_trapezoid, "Node_PB_Draw_Trapezoid", [1, Node_PB_Draw_Trapezoid]); addNodeObject(pb_draw, "Trapezoid", s_node_pb_draw_trapezoid, "Node_PB_Draw_Trapezoid", [1, Node_PB_Draw_Trapezoid]).hideRecent();
addNodeObject(pb_draw, "Diamond", s_node_pb_draw_diamond, "Node_PB_Draw_Diamond", [1, Node_PB_Draw_Diamond]); addNodeObject(pb_draw, "Diamond", s_node_pb_draw_diamond, "Node_PB_Draw_Diamond", [1, Node_PB_Draw_Diamond]).hideRecent();
addNodeObject(pb_draw, "Ellipse", s_node_pb_draw_ellipse, "Node_PB_Draw_Ellipse", [1, Node_PB_Draw_Ellipse]); addNodeObject(pb_draw, "Ellipse", s_node_pb_draw_ellipse, "Node_PB_Draw_Ellipse", [1, Node_PB_Draw_Ellipse]).hideRecent();
addNodeObject(pb_draw, "Semi-Ellipse", s_node_pb_draw_semi_ellipse, "Node_PB_Draw_Semi_Ellipse", [1, Node_PB_Draw_Semi_Ellipse]); addNodeObject(pb_draw, "Semi-Ellipse", s_node_pb_draw_semi_ellipse, "Node_PB_Draw_Semi_Ellipse", [1, Node_PB_Draw_Semi_Ellipse]).hideRecent();
addNodeObject(pb_draw, "Line", s_node_pb_draw_line, "Node_PB_Draw_Line", [1, Node_PB_Draw_Line]); addNodeObject(pb_draw, "Line", s_node_pb_draw_line, "Node_PB_Draw_Line", [1, Node_PB_Draw_Line]).hideRecent();
addNodeObject(pb_draw, "Angle", s_node_pb_draw_angle, "Node_PB_Draw_Angle", [1, Node_PB_Draw_Angle]); addNodeObject(pb_draw, "Angle", s_node_pb_draw_angle, "Node_PB_Draw_Angle", [1, Node_PB_Draw_Angle]).hideRecent();
addNodeObject(pb_draw, "Blob", s_node_pb_draw_blob, "Node_PB_Draw_Blob", [1, Node_PB_Draw_Blob]); addNodeObject(pb_draw, "Blob", s_node_pb_draw_blob, "Node_PB_Draw_Blob", [1, Node_PB_Draw_Blob]).hideRecent();
#endregion #endregion
var pb_box = ds_list_create(); #region var pb_box = ds_list_create(); #region
addNodePBCatagory("Box", pb_box); addNodePBCatagory("Box", pb_box);
ds_list_add(pb_box, "Layer"); ds_list_add(pb_box, "Layer");
addNodeObject(pb_box, "Layer", s_node_pb_layer, "Node_PB_Layer", [1, Node_PB_Layer]); addNodeObject(pb_box, "Layer", s_node_pb_layer, "Node_PB_Layer", [1, Node_PB_Layer]).hideRecent();
ds_list_add(pb_box, "Box"); ds_list_add(pb_box, "Box");
addNodeObject(pb_box, "Transform", s_node_pb_box_transform, "Node_PB_Box_Transform", [1, Node_PB_Box_Transform]); addNodeObject(pb_box, "Transform", s_node_pb_box_transform, "Node_PB_Box_Transform", [1, Node_PB_Box_Transform]).hideRecent();
addNodeObject(pb_box, "Mirror", s_node_pb_box_mirror, "Node_PB_Box_Mirror", [1, Node_PB_Box_Mirror]); addNodeObject(pb_box, "Mirror", s_node_pb_box_mirror, "Node_PB_Box_Mirror", [1, Node_PB_Box_Mirror]).hideRecent();
addNodeObject(pb_box, "Inset", s_node_pb_box_inset, "Node_PB_Box_Inset", [1, Node_PB_Box_Inset]); addNodeObject(pb_box, "Inset", s_node_pb_box_inset, "Node_PB_Box_Inset", [1, Node_PB_Box_Inset]).hideRecent();
addNodeObject(pb_box, "Split", s_node_pb_box_split, "Node_PB_Box_Split", [1, Node_PB_Box_Split]); addNodeObject(pb_box, "Split", s_node_pb_box_split, "Node_PB_Box_Split", [1, Node_PB_Box_Split]).hideRecent();
addNodeObject(pb_box, "Divide", s_node_pb_box_divide, "Node_PB_Box_Divide", [1, Node_PB_Box_Divide]); addNodeObject(pb_box, "Divide", s_node_pb_box_divide, "Node_PB_Box_Divide", [1, Node_PB_Box_Divide]).hideRecent();
addNodeObject(pb_box, "Divide Grid", s_node_pb_box_divide_grid, "Node_PB_Box_Divide_Grid", [1, Node_PB_Box_Divide_Grid]); addNodeObject(pb_box, "Divide Grid", s_node_pb_box_divide_grid, "Node_PB_Box_Divide_Grid", [1, Node_PB_Box_Divide_Grid]).hideRecent();
addNodeObject(pb_box, "Contract", s_node_pb_box_contract, "Node_PB_Box_Contract", [1, Node_PB_Box_Contract]); addNodeObject(pb_box, "Contract", s_node_pb_box_contract, "Node_PB_Box_Contract", [1, Node_PB_Box_Contract]).hideRecent();
#endregion #endregion
var pb_fx = ds_list_create(); #region var pb_fx = ds_list_create(); #region
addNodePBCatagory("Effects", pb_fx); addNodePBCatagory("Effects", pb_fx);
ds_list_add(pb_fx, "Effect"); ds_list_add(pb_fx, "Effect");
addNodeObject(pb_fx, "Outline", s_node_pb_fx_outline, "Node_PB_Fx_Outline", [1, Node_PB_Fx_Outline]); addNodeObject(pb_fx, "Outline", s_node_pb_fx_outline, "Node_PB_Fx_Outline", [1, Node_PB_Fx_Outline]).hideRecent();
addNodeObject(pb_fx, "Stack", s_node_pb_fx_stack, "Node_PB_Fx_Stack", [1, Node_PB_Fx_Stack]); addNodeObject(pb_fx, "Stack", s_node_pb_fx_stack, "Node_PB_Fx_Stack", [1, Node_PB_Fx_Stack]).hideRecent();
addNodeObject(pb_fx, "Radial", s_node_pb_fx_radial, "Node_PB_Fx_Radial", [1, Node_PB_Fx_Radial]); addNodeObject(pb_fx, "Radial", s_node_pb_fx_radial, "Node_PB_Fx_Radial", [1, Node_PB_Fx_Radial]).hideRecent();
ds_list_add(pb_fx, "Lighting"); ds_list_add(pb_fx, "Lighting");
addNodeObject(pb_fx, "Highlight", s_node_pb_fx_highlight, "Node_PB_Fx_Highlight", [1, Node_PB_Fx_Highlight]); addNodeObject(pb_fx, "Highlight", s_node_pb_fx_highlight, "Node_PB_Fx_Highlight", [1, Node_PB_Fx_Highlight]).hideRecent();
addNodeObject(pb_fx, "Shading", s_node_pb_fx_shading, "Node_PB_Fx_Shading", [1, Node_PB_Fx_Shading]); addNodeObject(pb_fx, "Shading", s_node_pb_fx_shading, "Node_PB_Fx_Shading", [1, Node_PB_Fx_Shading]).hideRecent();
ds_list_add(pb_fx, "Texture"); ds_list_add(pb_fx, "Texture");
addNodeObject(pb_fx, "Hashing", s_node_pb_fx_hash, "Node_PB_Fx_Hash", [1, Node_PB_Fx_Hash]); addNodeObject(pb_fx, "Hashing", s_node_pb_fx_hash, "Node_PB_Fx_Hash", [1, Node_PB_Fx_Hash]).hideRecent();
addNodeObject(pb_fx, "Strip", s_node_pb_fx_strip, "Node_PB_Fx_Strip", [1, Node_PB_Fx_Strip]); addNodeObject(pb_fx, "Strip", s_node_pb_fx_strip, "Node_PB_Fx_Strip", [1, Node_PB_Fx_Strip]).hideRecent();
addNodeObject(pb_fx, "Brick", s_node_pb_fx_brick, "Node_PB_Fx_Brick", [1, Node_PB_Fx_Brick]); addNodeObject(pb_fx, "Brick", s_node_pb_fx_brick, "Node_PB_Fx_Brick", [1, Node_PB_Fx_Brick]).hideRecent();
ds_list_add(pb_fx, "Blend"); ds_list_add(pb_fx, "Blend");
addNodeObject(pb_fx, "Add", s_node_pb_fx_add, "Node_PB_Fx_Add", [1, Node_PB_Fx_Add]); addNodeObject(pb_fx, "Add", s_node_pb_fx_add, "Node_PB_Fx_Add", [1, Node_PB_Fx_Add]).hideRecent();
addNodeObject(pb_fx, "Subtract", s_node_pb_fx_subtract, "Node_PB_Fx_Subtract", [1, Node_PB_Fx_Subtract]); addNodeObject(pb_fx, "Subtract", s_node_pb_fx_subtract, "Node_PB_Fx_Subtract", [1, Node_PB_Fx_Subtract]).hideRecent();
addNodeObject(pb_fx, "Intersect", s_node_pb_fx_interesct, "Node_PB_Fx_Intersect", [1, Node_PB_Fx_Intersect]); addNodeObject(pb_fx, "Intersect", s_node_pb_fx_interesct, "Node_PB_Fx_Intersect", [1, Node_PB_Fx_Intersect]).hideRecent();
#endregion #endregion
var pb_arr = ds_list_create(); #region var pb_arr = ds_list_create(); #region
addNodePBCatagory("Array", pb_arr); addNodePBCatagory("Array", pb_arr);
addNodeObject(pb_arr, "Array", s_node_array, "Node_Array", [1, Node_Array]); addNodeObject(pb_arr, "Array", s_node_array, "Node_Array", [1, Node_Array]).hideRecent();
addNodeObject(pb_arr, "Array Get", s_node_array_get, "Node_Array_Get", [1, Node_Array_Get], ["get array"]); addNodeObject(pb_arr, "Array Get", s_node_array_get, "Node_Array_Get", [1, Node_Array_Get], ["get array"]).hideRecent();
addNodeObject(pb_arr, "Array Set", s_node_array_set, "Node_Array_Set", [1, Node_Array_Set], ["set array"]).setVersion(1120); addNodeObject(pb_arr, "Array Set", s_node_array_set, "Node_Array_Set", [1, Node_Array_Set], ["set array"]).hideRecent().setVersion(1120);
addNodeObject(pb_arr, "Array Insert", s_node_array_insert, "Node_Array_Insert", [1, Node_Array_Insert], ["insert array"]).setVersion(1120); addNodeObject(pb_arr, "Array Insert", s_node_array_insert, "Node_Array_Insert", [1, Node_Array_Insert], ["insert array"]).hideRecent().setVersion(1120);
addNodeObject(pb_arr, "Array Remove", s_node_array_remove, "Node_Array_Remove", [1, Node_Array_Remove], ["remove array", "delete array", "array delete"]).setVersion(1120); addNodeObject(pb_arr, "Array Remove", s_node_array_remove, "Node_Array_Remove", [1, Node_Array_Remove], ["remove array", "delete array", "array delete"]).hideRecent().setVersion(1120);
#endregion #endregion
//////////////////////////////////////////////////////////////// PCX NODES //////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////// PCX NODES ////////////////////////////////////////////////////////////////
var pcx_var = ds_list_create(); #region var pcx_var = ds_list_create(); #region
addNodePCXCatagory("Variable", pcx_var); addNodePCXCatagory("Variable", pcx_var);
addNodeObject(pcx_var, "Variable", s_node_array, "Node_PCX_var", [1, Node_PCX_var]); addNodeObject(pcx_var, "Variable", s_node_array, "Node_PCX_var", [1, Node_PCX_var]).hideRecent();
addNodeObject(pcx_var, "Fn Variable", s_node_array, "Node_PCX_fn_var", [1, Node_PCX_fn_var]); addNodeObject(pcx_var, "Fn Variable", s_node_array, "Node_PCX_fn_var", [1, Node_PCX_fn_var]).hideRecent();
#endregion #endregion
var pcx_fn = ds_list_create(); #region var pcx_fn = ds_list_create(); #region
addNodePCXCatagory("Functions", pcx_fn); addNodePCXCatagory("Functions", pcx_fn);
addNodeObject(pcx_fn, "Equation", s_node_array, "Node_PCX_Equation", [1, Node_PCX_Equation]); addNodeObject(pcx_fn, "Equation", s_node_array, "Node_PCX_Equation", [1, Node_PCX_Equation]).hideRecent();
ds_list_add(pcx_fn, "Numbers"); ds_list_add(pcx_fn, "Numbers");
addNodeObject(pcx_fn, "Math", s_node_array, "Node_PCX_fn_Math", [1, Node_PCX_fn_Math]); addNodeObject(pcx_fn, "Math", s_node_array, "Node_PCX_fn_Math", [1, Node_PCX_fn_Math]).hideRecent();
addNodeObject(pcx_fn, "Random", s_node_array, "Node_PCX_fn_Random", [1, Node_PCX_fn_Random]); addNodeObject(pcx_fn, "Random", s_node_array, "Node_PCX_fn_Random", [1, Node_PCX_fn_Random]).hideRecent();
ds_list_add(pcx_fn, "Surface"); ds_list_add(pcx_fn, "Surface");
addNodeObject(pcx_fn, "Surface Width", s_node_array, "Node_PCX_fn_Surface_Width", [1, Node_PCX_fn_Surface_Width]); addNodeObject(pcx_fn, "Surface Width", s_node_array, "Node_PCX_fn_Surface_Width", [1, Node_PCX_fn_Surface_Width]).hideRecent();
addNodeObject(pcx_fn, "Surface Height", s_node_array, "Node_PCX_fn_Surface_Height", [1, Node_PCX_fn_Surface_Height]); addNodeObject(pcx_fn, "Surface Height", s_node_array, "Node_PCX_fn_Surface_Height", [1, Node_PCX_fn_Surface_Height]).hideRecent();
ds_list_add(pcx_fn, "Array"); ds_list_add(pcx_fn, "Array");
addNodeObject(pcx_fn, "Array Get", s_node_array, "Node_PCX_Array_Get", [1, Node_PCX_Array_Get]); addNodeObject(pcx_fn, "Array Get", s_node_array, "Node_PCX_Array_Get", [1, Node_PCX_Array_Get]).hideRecent();
addNodeObject(pcx_fn, "Array Set", s_node_array, "Node_PCX_Array_Set", [1, Node_PCX_Array_Set]); addNodeObject(pcx_fn, "Array Set", s_node_array, "Node_PCX_Array_Set", [1, Node_PCX_Array_Set]).hideRecent();
#endregion #endregion
var pcx_flow = ds_list_create(); #region var pcx_flow = ds_list_create(); #region
addNodePCXCatagory("Flow Control", pcx_flow); addNodePCXCatagory("Flow Control", pcx_flow);
addNodeObject(pcx_flow, "Condition", s_node_array, "Node_PCX_Condition", [1, Node_PCX_Condition]); addNodeObject(pcx_flow, "Condition", s_node_array, "Node_PCX_Condition", [1, Node_PCX_Condition]).hideRecent();
#endregion #endregion
//////////////////////////////////////////////////////////////// HIDDENS //////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////// HIDDENS ////////////////////////////////////////////////////////////////
var hid = ds_list_create(); #region var hid = ds_list_create(); #region
addNodeCatagory("Hidden", hid, ["Hidden"]); addNodeCatagory("Hidden", hid, ["Hidden"]);
addNodeObject(hid, "Input", s_node_loop_input, "Node_Iterator_Each_Input", [1, Node_Iterator_Each_Input]); addNodeObject(hid, "Input", s_node_loop_input, "Node_Iterator_Each_Input", [1, Node_Iterator_Each_Input]).hideRecent();
addNodeObject(hid, "Output", s_node_loop_output, "Node_Iterator_Each_Output", [1, Node_Iterator_Each_Output]); addNodeObject(hid, "Output", s_node_loop_output, "Node_Iterator_Each_Output", [1, Node_Iterator_Each_Output]).hideRecent();
addNodeObject(hid, "Input", s_node_loop_input, "Node_Iterator_Filter_Input", [1, Node_Iterator_Filter_Input]); addNodeObject(hid, "Input", s_node_loop_input, "Node_Iterator_Filter_Input", [1, Node_Iterator_Filter_Input]).hideRecent();
addNodeObject(hid, "Output", s_node_loop_output, "Node_Iterator_Filter_Output", [1, Node_Iterator_Filter_Output]); addNodeObject(hid, "Output", s_node_loop_output, "Node_Iterator_Filter_Output", [1, Node_Iterator_Filter_Output]).hideRecent();
addNodeObject(hid, "Grid Noise", s_node_grid_noise, "Node_Grid_Noise", [1, Node_Grid_Noise]); addNodeObject(hid, "Grid Noise", s_node_grid_noise, "Node_Grid_Noise", [1, Node_Grid_Noise]).hideRecent();
addNodeObject(hid, "Triangular Noise", s_node_grid_tri_noise, "Node_Noise_Tri", [1, Node_Noise_Tri]).setVersion(1090); addNodeObject(hid, "Triangular Noise", s_node_grid_tri_noise, "Node_Noise_Tri", [1, Node_Noise_Tri]).hideRecent().setVersion(1090);
addNodeObject(hid, "Hexagonal Noise", s_node_grid_hex_noise, "Node_Noise_Hex", [1, Node_Noise_Hex]).setVersion(1090); addNodeObject(hid, "Hexagonal Noise", s_node_grid_hex_noise, "Node_Noise_Hex", [1, Node_Noise_Hex]).hideRecent().setVersion(1090);
addNodeObject(hid, "Sort Input", s_node_grid_hex_noise, "Node_Iterator_Sort_Input", [1, Node_Iterator_Sort_Input]); addNodeObject(hid, "Sort Input", s_node_grid_hex_noise, "Node_Iterator_Sort_Input", [1, Node_Iterator_Sort_Input]).hideRecent();
addNodeObject(hid, "Sort Output", s_node_grid_hex_noise, "Node_Iterator_Sort_Output", [1, Node_Iterator_Sort_Output]); addNodeObject(hid, "Sort Output", s_node_grid_hex_noise, "Node_Iterator_Sort_Output", [1, Node_Iterator_Sort_Output]).hideRecent();
addNodeObject(hid, "Onion Skin", s_node_cache, "Node_Onion_Skin", [1, Node_Onion_Skin]).setVersion(1147); addNodeObject(hid, "Onion Skin", s_node_cache, "Node_Onion_Skin", [1, Node_Onion_Skin]).setVersion(1147).hideRecent();
//addNodeObject(hid, "Pixel Builder", s_node_pixel_builder, "Node_Pixel_Builder", [1, Node_Pixel_Builder]).setVersion(1150); //addNodeObject(hid, "Pixel Builder", s_node_pixel_builder, "Node_Pixel_Builder", [1, Node_Pixel_Builder]).setVersion(1150).hideRecent();
addNodeObject(hid, "Input", s_node_pixel_builder, "Node_DynaSurf_In", [1, Node_DynaSurf_In]); addNodeObject(hid, "Input", s_node_pixel_builder, "Node_DynaSurf_In", [1, Node_DynaSurf_In]).hideRecent();
addNodeObject(hid, "Output", s_node_pixel_builder, "Node_DynaSurf_Out", [1, Node_DynaSurf_Out]); addNodeObject(hid, "Output", s_node_pixel_builder, "Node_DynaSurf_Out", [1, Node_DynaSurf_Out]).hideRecent();
addNodeObject(hid, "getWidth", s_node_pixel_builder, "Node_DynaSurf_Out_Width", [1, Node_DynaSurf_Out_Width]); addNodeObject(hid, "getWidth", s_node_pixel_builder, "Node_DynaSurf_Out_Width", [1, Node_DynaSurf_Out_Width]).hideRecent();
addNodeObject(hid, "getHeight", s_node_pixel_builder, "Node_DynaSurf_Out_Height", [1, Node_DynaSurf_Out_Height]); addNodeObject(hid, "getHeight", s_node_pixel_builder, "Node_DynaSurf_Out_Height", [1, Node_DynaSurf_Out_Height]).hideRecent();
#endregion #endregion
} }
#endregion #endregion

View File

@ -33,10 +33,20 @@ function Node_Text(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) cons
inputs[| 10] = nodeValue("Padding", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, [0, 0, 0, 0]) inputs[| 10] = nodeValue("Padding", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, [0, 0, 0, 0])
.setDisplay(VALUE_DISPLAY.padding); .setDisplay(VALUE_DISPLAY.padding);
inputs[| 11] = nodeValue("Letter spacing", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0);
inputs[| 12] = nodeValue("Line height", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0);
inputs[| 13] = nodeValue("Path", self, JUNCTION_CONNECT.input, VALUE_TYPE.pathnode, noone)
.setVisible(true, true);
inputs[| 14] = nodeValue("Path shift", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0);
input_display_list = [ input_display_list = [
["Output", true], 9, 6, 10, ["Output", true], 9, 6, 10,
["Text", false], 0, 7, 8, 5, ["Text", false], 0, 13, 14, 7, 8,
["Font properties", false], 1, 2, 3, ["Font", false], 1, 2, 3, 11, 12,
["Rendering", false], 5,
]; ];
outputs[| 0] = nodeValue("Surface out", self, JUNCTION_CONNECT.output, VALUE_TYPE.surface, noone); outputs[| 0] = nodeValue("Surface out", self, JUNCTION_CONNECT.output, VALUE_TYPE.surface, noone);
@ -47,7 +57,7 @@ function Node_Text(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) cons
_size_current = 0; _size_current = 0;
_aa_current = false; _aa_current = false;
static generateFont = function(_path, _size, _aa) { static generateFont = function(_path, _size, _aa) { #region
if(PROJECT.animator.is_playing) return; if(PROJECT.animator.is_playing) return;
if(_path == _font_current && _size == _size_current && _aa == _aa_current) return; if(_path == _font_current && _size == _size_current && _aa == _aa_current) return;
@ -62,68 +72,165 @@ function Node_Text(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) cons
font_add_enable_aa(_aa); font_add_enable_aa(_aa);
font = _font_add(_path, _size); font = _font_add(_path, _size);
} } #endregion
static processData = function(_outSurf, _data, _output_index, _array_index) { static step = function() { #region
var str = _data[0]; var _dimt = getSingleValue(9);
var _font = _data[1]; var _path = getSingleValue(13);
var _size = _data[2];
var _aa = _data[3];
var _col = _data[5];
var _use_path = _path != noone && struct_has(_path, "getPointDistance");
inputs[| 6].setVisible(_dimt == 0 || _use_path);
inputs[| 7].setVisible(_dimt == 0 || _use_path);
inputs[| 8].setVisible(_dimt == 0 || _use_path);
inputs[| 9].setVisible(!_use_path);
inputs[| 14].setVisible( _use_path);
} #endregion
static processData = function(_outSurf, _data, _output_index, _array_index) { #region
var str = _data[0];
var _font = _data[1];
var _size = _data[2];
var _aa = _data[3];
var _col = _data[5];
var _dim = _data[6];
var _hali = _data[7];
var _vali = _data[8];
var _dim_type = _data[9]; var _dim_type = _data[9];
inputs[| 6].setVisible(!_dim_type); var _padd = _data[10];
var _trck = _data[11];
var _dim = _data[6]; var _line = _data[12];
var _padd = _data[10]; var _path = _data[13];
var _pthS = _data[14];
var ww, hh;
generateFont(_font, _size, _aa); generateFont(_font, _size, _aa);
draw_set_font(font); draw_set_font(font);
if(_dim_type == 0) {
ww = _dim[0]; var _str_lines = string_splice(str, "\n");
hh = _dim[1]; _line_widths = [];
var ww = 0, _sw = 0;
var hh = 0, _sh = 0;
__temp_len = string_length(str);
__temp_lw = 0;
__temp_ww = 0;
__temp_hh = line_get_height();
__temp_trck = _trck;
__temp_line = _line;
string_foreach(str, function(_chr, _ind) {
if(_chr == "\n") {
var _lw = max(0, __temp_lw - __temp_trck);
array_push(_line_widths, _lw);
__temp_ww = max(__temp_ww, _lw);
__temp_hh += string_height(_chr) + __temp_line;
__temp_lw = 0;
} else
__temp_lw += string_width(_chr) + __temp_trck;
});
var _lw = max(0, __temp_lw - __temp_trck);
array_push(_line_widths, _lw);
__temp_ww = max(__temp_ww, _lw);
ww = __temp_ww;
hh = __temp_hh;
var _use_path = _path != noone && struct_has(_path, "getPointDistance");
if(_use_path || _dim_type == 0) {
_sw = _dim[0];
_sh = _dim[1];
} else { } else {
ww = max(1, string_width(str)); _sw = ww;
hh = max(1, string_height(str)); _sh = hh;
} }
ww += _padd[PADDING.left] + _padd[PADDING.right]; _sw += _padd[PADDING.left] + _padd[PADDING.right];
hh += _padd[PADDING.top] + _padd[PADDING.bottom]; _sh += _padd[PADDING.top] + _padd[PADDING.bottom];
_outSurf = surface_verify(_outSurf, ww, hh, attrDepth()); _outSurf = surface_verify(_outSurf, _sw, _sh, attrDepth());
surface_set_target(_outSurf); var tx = 0, ty = _padd[PADDING.top], _ty = 0;
DRAW_CLEAR if(_dim_type == 0) {
BLEND_ALPHA switch(_vali) {
case 0 : ty = _padd[PADDING.top]; break;
if(_dim[0] != 0 && _dim[1] != 0) { case 1 : ty = (_sh - hh) / 2; break;
var _hali = _data[7]; case 2 : ty = _sh - _padd[PADDING.bottom] - hh; break;
var _vali = _data[8];
var tx = 0, ty = 0;
draw_set_text(font, fa_left, fa_top, _col);
switch(_hali) {
case 0 : draw_set_halign(fa_left); tx = 0; break;
case 1 : draw_set_halign(fa_center); tx = ww / 2; break;
case 2 : draw_set_halign(fa_right); tx = ww; break;
}
switch(_vali) {
case 0 : draw_set_valign(fa_top); ty = 0; break;
case 1 : draw_set_valign(fa_middle); ty = hh / 2; break;
case 2 : draw_set_valign(fa_bottom); ty = hh; break;
}
draw_text(_padd[PADDING.left] + tx, _padd[PADDING.top] + ty, str);
} else {
draw_set_text(font, fa_left, fa_top, _col);
draw_text(_padd[PADDING.left], _padd[PADDING.top], str);
} }
}
BLEND_NORMAL;
surface_reset_target(); surface_set_shader(_outSurf, noone,, BLEND.alpha);
for( var i = 0, n = array_length(_str_lines); i < n; i++ ) {
var _str_line = _str_lines[i];
var _line_width = _line_widths[i];
if(_use_path) {
draw_set_text(font, fa_left, fa_bottom, _col);
tx = _pthS;
ty = 0;
switch(_hali) {
case 0 : tx = _pthS; break;
case 1 : tx = _pthS - _line_width / 2; break;
case 2 : tx = _line_width - _pthS; break;
}
switch(_vali) {
case 0 : ty = _ty; break;
case 1 : ty = -hh / 2 + _ty; break;
case 2 : ty = -hh + _ty; break;
}
__temp_tx = tx;
__temp_ty = ty;
__temp_pt = _path;
string_foreach(_str_line, function(_chr, _ind) {
var _pos = __temp_pt.getPointDistance(__temp_tx);
var _nor = 0;
if(__temp_tx < 0.9) {
var _p2 = __temp_pt.getPointDistance(__temp_tx + 0.1);
_nor = point_direction(_pos.x, _pos.y, _p2.x, _p2.y);
} else {
var _p2 = __temp_pt.getPointDistance(__temp_tx - 0.1);
_nor = point_direction(_p2.x, _p2.y, _pos.x, _pos.y);
}
var _line_ang = _nor - 90;
var _dx = lengthdir_x(__temp_ty, _line_ang);
var _dy = lengthdir_y(__temp_ty, _line_ang);
draw_text_transformed(_pos.x + _dx, _pos.y + _dy, _chr, 1, 1, _nor);
__temp_tx += string_width(_chr) + __temp_trck;
});
_ty += line_get_height() + _line;
} else {
draw_set_text(font, fa_left, fa_top, _col);
tx = _padd[PADDING.left];
if(_dim_type == 0)
switch(_hali) {
case 0 : tx = _padd[PADDING.left]; break;
case 1 : tx = (_sw - _line_width) / 2; break;
case 2 : tx = _sw - _padd[PADDING.right] - _line_width; break;
}
__temp_tx = tx;
__temp_ty = ty;
__temp_trck = _trck;
string_foreach(_str_line, function(_chr, _ind) {
draw_text(__temp_tx, __temp_ty, _chr);
__temp_tx += string_width(_chr) + __temp_trck;
});
ty += line_get_height() + _line;
}
}
surface_reset_shader();
return _outSurf; return _outSurf;
} } #endregion
} }

View File

@ -1,3 +1,16 @@
function safe_mod(numb, modd) { enum MOD_NEG {
return modd == 0? 0 : numb % modd; _default,
wrap
}
function safe_mod(numb, modd, _neg = MOD_NEG._default) {
gml_pragma("forceinline");
var _md = modd == 0? 0 : numb % modd;
if(_md < 0)
switch(_neg) {
case MOD_NEG.wrap : _md += modd; break;
}
return _md;
} }