This commit is contained in:
Tanasart 2022-12-27 19:30:02 +07:00
parent efcf643382
commit 1df883e5bc
61 changed files with 230 additions and 167 deletions

View file

@ -973,7 +973,6 @@
{"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"s_vfx.png","CopyToMask":-1,"filePath":"datafiles/data/themes/default/graphics/icon",},
{"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"graphics.ai","CopyToMask":-1,"filePath":"datafiles/data/themes/default/graphics/preview",},
{"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"anchor_arrow.png","CopyToMask":-1,"filePath":"datafiles/data/themes/default/graphics/preview",},
{"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"Collections.zip","CopyToMask":-1,"filePath":"datafiles/data",},
{"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"s_noti_icon_tick.png","CopyToMask":-1,"filePath":"datafiles/data/themes/default/graphics/icon",},
{"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"Assets.zip","CopyToMask":-1,"filePath":"datafiles/data",},
{"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"graphic.ai","CopyToMask":-1,"filePath":"datafiles/data/themes/default/graphics/node",},
@ -985,6 +984,7 @@
{"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"graphic x2.ai","CopyToMask":-1,"filePath":"datafiles/data/themes/default/graphics/node",},
{"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"s_node_new_badge.png","CopyToMask":-1,"filePath":"datafiles/data/themes/default/graphics/node",},
{"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"default.zip","CopyToMask":-1,"filePath":"datafiles/data/themes",},
{"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"Collections.zip","CopyToMask":-1,"filePath":"datafiles/data",},
],
"MetaData": {
"IDEVersion": "2022.11.1.56",

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

Binary file not shown.

View file

@ -2,9 +2,9 @@
"resourceType": "GMWindowsOptions",
"resourceVersion": "1.1",
"name": "Windows",
"option_windows_display_name": "Pixel Composer 1.0.7",
"option_windows_executable_name": "${project_name} 1.0.7.exe",
"option_windows_version": "1.0.7.0",
"option_windows_display_name": "Pixel Composer 1.0.8",
"option_windows_executable_name": "${project_name} 1.0.8.exe",
"option_windows_version": "1.0.8.0",
"option_windows_company_info": "MakhamDev",
"option_windows_product_info": "Pixel Composer",
"option_windows_copyright_info": "",

View file

@ -21,9 +21,9 @@
COLOR_KEYS = [];
globalvar VERSION, SAVEFILE_VERSION, VERSION_STRING;
VERSION = 1070;
VERSION = 1080;
SAVEFILE_VERSION = 1070;
VERSION_STRING = "1.0.7";
VERSION_STRING = "1.0.8";
globalvar NODES, NODE_MAP, APPEND_MAP, HOTKEYS, HOTKEY_CONTEXT;

View file

@ -154,6 +154,8 @@ function LOAD_PATH(path, readonly = false) {
}
}
UPDATE = RENDER_TYPE.full;
LOADING = false;
MODIFIED = false;

View file

@ -20,7 +20,7 @@ function Node_2D_light(_x, _y, _group = -1) : Node_Processor(_x, _y, _group) con
inputs[| 2] = nodeValue(2, "Center", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 16, 16])
.setDisplay(VALUE_DISPLAY.vector)
.setUnitRef(function(index) { return getDimension(0, index); });
.setUnitRef(function(index) { return getDimension(index); });
inputs[| 3] = nodeValue(3, "Range", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 16);
inputs[| 4] = nodeValue(4, "Intensity", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 1)

View file

@ -1,5 +1,6 @@
function Node_3D_Cube(_x, _y, _group = -1) : Node_Processor(_x, _y, _group) constructor {
name = "3D Cube";
dimension_index = 1;
uniVertex_lightFor = shader_get_uniform(sh_vertex_pnt_light, "u_LightForward");
uniLightAmb = shader_get_uniform(sh_vertex_pnt_light, "u_AmbientLight");
@ -13,7 +14,7 @@ function Node_3D_Cube(_x, _y, _group = -1) : Node_Processor(_x, _y, _group) cons
inputs[| 2] = nodeValue(2, "Position", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ def_surf_size / 2, def_surf_size / 2 ])
.setDisplay(VALUE_DISPLAY.vector)
.setUnitRef(function(index) { return getDimension(1, index); });
.setUnitRef(function(index) { return getDimension(index); });
inputs[| 3] = nodeValue(3, "Rotation", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 0, 0, 0 ])
.setDisplay(VALUE_DISPLAY.vector);

View file

@ -1,5 +1,6 @@
function Node_3D_Cylinder(_x, _y, _group = -1) : Node_Processor(_x, _y, _group) constructor {
name = "3D Cylinder";
dimension_index = 2;
uniVertex_lightFor = shader_get_uniform(sh_vertex_pnt_light, "u_LightForward");
uniLightAmb = shader_get_uniform(sh_vertex_pnt_light, "u_AmbientLight");
@ -16,7 +17,7 @@ function Node_3D_Cylinder(_x, _y, _group = -1) : Node_Processor(_x, _y, _group)
inputs[| 3] = nodeValue(3, "Position", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ def_surf_size / 2, def_surf_size / 2 ])
.setDisplay(VALUE_DISPLAY.vector)
.setUnitRef(function(index) { return getDimension(2, index); });
.setUnitRef(function(index) { return getDimension(index); });
inputs[| 4] = nodeValue(4, "Rotation", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 0, 0, 0 ])
.setDisplay(VALUE_DISPLAY.vector);

View file

@ -5,7 +5,7 @@ function Node_3D_Transform(_x, _y, _group = -1) : Node_Processor(_x, _y, _group)
inputs[| 1] = nodeValue(1, "Position", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 0, 0 ])
.setDisplay(VALUE_DISPLAY.vector)
.setUnitRef(function(index) { return getDimension(0, index); });
.setUnitRef(function(index) { return getDimension(index); });
inputs[| 2] = nodeValue(2, "Rotation", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 0, 0, 0 ])
.setDisplay(VALUE_DISPLAY.vector);

View file

@ -8,7 +8,7 @@ function Node_9Slice(_x, _y, _group = -1) : Node_Processor(_x, _y, _group) const
inputs[| 2] = nodeValue(2, "Splice", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, [ 0, 0, 0, 0 ])
.setDisplay(VALUE_DISPLAY.padding)
.setUnitRef(function(index) { return getDimension(0, index); });
.setUnitRef(function(index) { return getDimension(index); });
inputs[| 3] = nodeValue(3, "Filling modes", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0)
.setDisplay(VALUE_DISPLAY.enum_scroll, [ "Scale", "Repeat" ]);

View file

@ -12,7 +12,7 @@ function Node_Blur_Radial(_x, _y, _group = -1) : Node_Processor(_x, _y, _group)
inputs[| 2] = nodeValue(2, "Center", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 0, 0 ])
.setDisplay(VALUE_DISPLAY.vector)
.setUnitRef(function(index) { return getDimension(0, index); });
.setUnitRef(function(index) { return getDimension(index); });
inputs[| 3] = nodeValue(3, "Oversample mode", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0)
.setDisplay(VALUE_DISPLAY.enum_scroll, [ "Empty", "Clamp", "Repeat" ]);

View file

@ -5,7 +5,7 @@ function Node_Camera(_x, _y, _group = -1) : Node_Processor(_x, _y, _group) const
inputs[| 0] = nodeValue(0, "Scene", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, 0);
inputs[| 1] = nodeValue(1, "Focus area", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, [ 16, 16, 4, 4, AREA_SHAPE.rectangle ])
.setDisplay(VALUE_DISPLAY.area)
.setUnitRef(function(index) { return getDimension(0, index); });
.setUnitRef(function(index) { return getDimension(index); });
outputs[| 0] = nodeValue(0, "Surface out", self, JUNCTION_CONNECT.output, VALUE_TYPE.surface, PIXEL_SURFACE);

View file

@ -21,7 +21,7 @@ function Node_Checker(_x, _y, _group = -1) : Node_Processor(_x, _y, _group) cons
inputs[| 3] = nodeValue(3, "Position", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, [0, 0] )
.setDisplay(VALUE_DISPLAY.vector)
.setUnitRef(function(index) { return getDimension(0, index); });
.setUnitRef(function(index) { return getDimension(index); });
inputs[| 4] = nodeValue(4, "Color 1", self, JUNCTION_CONNECT.input, VALUE_TYPE.color, c_white);
inputs[| 5] = nodeValue(5, "Color 2", self, JUNCTION_CONNECT.input, VALUE_TYPE.color, c_black);

View file

@ -9,7 +9,7 @@ function Node_Chromatic_Aberration(_x, _y, _group = -1) : Node_Processor(_x, _y,
inputs[| 0] = nodeValue(0, "Surface in", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, 0);
inputs[| 1] = nodeValue(1, "Center", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 0, 0 ])
.setDisplay(VALUE_DISPLAY.vector)
.setUnitRef(function(index) { return getDimension(0, index); });
.setUnitRef(function(index) { return getDimension(index); });
inputs[| 2] = nodeValue(2, "Strength", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 1)
.setDisplay(VALUE_DISPLAY.slider, [-16, 16, 0.01]);

View file

@ -5,7 +5,7 @@ function Node_Sampler(_x, _y, _group = -1) : Node_Processor(_x, _y, _group) cons
inputs[| 1] = nodeValue(1, "Position", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 0, 0 ])
.setDisplay(VALUE_DISPLAY.vector)
.setUnitRef(function(index) { return getDimension(0, index); });
.setUnitRef(function(index) { return getDimension(index); });
outputs[| 0] = nodeValue(0, "Color", self, JUNCTION_CONNECT.output, VALUE_TYPE.color, c_white);

View file

@ -6,7 +6,7 @@ function Node_Crop(_x, _y, _group = -1) : Node_Processor(_x, _y, _group) constru
inputs[| 1] = nodeValue(1, "Crop", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, [ 0, 0, 0, 0 ])
.setDisplay(VALUE_DISPLAY.padding)
.setUnitRef(function(index) { return getDimension(0, index); });
.setUnitRef(function(index) { return getDimension(index); });
outputs[| 0] = nodeValue(0, "Surface out", self, JUNCTION_CONNECT.output, VALUE_TYPE.surface, PIXEL_SURFACE);

View file

@ -11,7 +11,7 @@ function Node_Dilate(_x, _y, _group = -1) : Node_Processor(_x, _y, _group) const
inputs[| 0] = nodeValue(0, "Surface in", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, 0);
inputs[| 1] = nodeValue(1, "Center", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 0, 0 ])
.setDisplay(VALUE_DISPLAY.vector)
.setUnitRef(function(index) { return getDimension(0, index); });
.setUnitRef(function(index) { return getDimension(index); });
inputs[| 2] = nodeValue(2, "Strength", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 1)
.setDisplay(VALUE_DISPLAY.slider, [-3, 3, 0.01]);

View file

@ -16,7 +16,7 @@ function Node_Displace(_x, _y, _group = -1) : Node_Processor(_x, _y, _group) con
inputs[| 1] = nodeValue(1, "Displace map", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, 0);
inputs[| 2] = nodeValue(2, "Position", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [1, 0] )
.setDisplay(VALUE_DISPLAY.vector)
.setUnitRef(function(index) { return getDimension(0, index); });
.setUnitRef(function(index) { return getDimension(index); });
inputs[| 3] = nodeValue(3, "Strength", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 1);
inputs[| 4] = nodeValue(4, "Mid value", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0.)

View file

@ -34,7 +34,7 @@ function Node_Gradient(_x, _y, _group = -1) : Node_Processor(_x, _y, _group) con
inputs[| 6] = nodeValue(6, "Center", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [def_surf_size / 2, def_surf_size / 2])
.setDisplay(VALUE_DISPLAY.vector)
.setUnitRef(function(index) { return getDimension(0, index); });
.setUnitRef(function(index) { return getDimension(index); });
inputs[| 7] = nodeValue(7, "Loop", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, false);

View file

@ -11,22 +11,22 @@ function Node_Gradient_Points(_x, _y, _group = -1) : Node_Processor(_x, _y, _gro
inputs[| 1] = nodeValue(1, "Center 1", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 0, 0 ] )
.setDisplay(VALUE_DISPLAY.vector)
.setUnitRef(function(index) { return getDimension(0, index); });
.setUnitRef(function(index) { return getDimension(index); });
inputs[| 2] = nodeValue(2, "Color 1", self, JUNCTION_CONNECT.input, VALUE_TYPE.color, c_white );
inputs[| 3] = nodeValue(3, "Center 2", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ def_surf_size, 0 ] )
.setDisplay(VALUE_DISPLAY.vector)
.setUnitRef(function(index) { return getDimension(0, index); });
.setUnitRef(function(index) { return getDimension(index); });
inputs[| 4] = nodeValue(4, "Color 2", self, JUNCTION_CONNECT.input, VALUE_TYPE.color, c_white );
inputs[| 5] = nodeValue(5, "Center 3", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 0, def_surf_size ] )
.setDisplay(VALUE_DISPLAY.vector)
.setUnitRef(function(index) { return getDimension(0, index); });
.setUnitRef(function(index) { return getDimension(index); });
inputs[| 6] = nodeValue(6, "Color 3", self, JUNCTION_CONNECT.input, VALUE_TYPE.color, c_white );
inputs[| 7] = nodeValue(7, "Center 4", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ def_surf_size, def_surf_size ] )
.setDisplay(VALUE_DISPLAY.vector)
.setUnitRef(function(index) { return getDimension(0, index); });
.setUnitRef(function(index) { return getDimension(index); });
inputs[| 8] = nodeValue(8, "Color 4", self, JUNCTION_CONNECT.input, VALUE_TYPE.color, c_white );
outputs[| 0] = nodeValue(0, "Surface out", self, JUNCTION_CONNECT.output, VALUE_TYPE.surface, PIXEL_SURFACE);

View file

@ -20,7 +20,7 @@ function Node_Grid(_x, _y, _group = -1) : Node_Processor(_x, _y, _group) constru
inputs[| 1] = nodeValue(1, "Position", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 0, 0 ])
.setDisplay(VALUE_DISPLAY.vector)
.setUnitRef(function(index) { return getDimension(0, index); });
.setUnitRef(function(index) { return getDimension(index); });
inputs[| 2] = nodeValue(2, "Scale", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 4, 4 ])
.setDisplay(VALUE_DISPLAY.vector);

View file

@ -13,7 +13,7 @@ function Node_Grid_Hex(_x, _y, _group = -1) : Node_Processor(_x, _y, _group) con
inputs[| 1] = nodeValue(1, "Position", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 0, 0 ])
.setDisplay(VALUE_DISPLAY.vector)
.setUnitRef(function(index) { return getDimension(0, index); });
.setUnitRef(function(index) { return getDimension(index); });
inputs[| 2] = nodeValue(2, "Scale", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 4, 4 ])
.setDisplay(VALUE_DISPLAY.vector);

View file

@ -13,7 +13,7 @@ function Node_Grid_Tri(_x, _y, _group = -1) : Node_Processor(_x, _y, _group) con
inputs[| 1] = nodeValue(1, "Position", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 0, 0 ])
.setDisplay(VALUE_DISPLAY.vector)
.setUnitRef(function(index) { return getDimension(0, index); });
.setUnitRef(function(index) { return getDimension(index); });
inputs[| 2] = nodeValue(2, "Scale", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 4, 4 ])
.setDisplay(VALUE_DISPLAY.vector);

View file

@ -39,7 +39,7 @@ function Node_Image_Animated(_x, _y, _group = -1) : Node(_x, _y, _group) constru
update_on_frame = true;
always_output = true;
inputs[| 0] = nodeValue(0, "Path", self, JUNCTION_CONNECT.input, VALUE_TYPE.path, "")
inputs[| 0] = nodeValue(0, "Path", self, JUNCTION_CONNECT.input, VALUE_TYPE.path, [])
.setDisplay(VALUE_DISPLAY.path_array, ["*.png", ""]);
inputs[| 1] = nodeValue(1, "Padding", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, [0, 0, 0, 0])

View file

@ -40,7 +40,7 @@ function Node_Image_Sequence(_x, _y, _group = -1) : Node(_x, _y, _group) constru
color = COLORS.node_blend_input;
always_output = true;
inputs[| 0] = nodeValue(0, "Path", self, JUNCTION_CONNECT.input, VALUE_TYPE.path, "")
inputs[| 0] = nodeValue(0, "Path", self, JUNCTION_CONNECT.input, VALUE_TYPE.path, [])
.setDisplay(VALUE_DISPLAY.path_array, ["*.png", ""]);
inputs[| 1] = nodeValue(1, "Padding", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, [0, 0, 0, 0])

View file

@ -1,6 +1,5 @@
function Node_Image_Sheet(_x, _y, _group = -1) : Node(_x, _y, _group) constructor {
name = "Splice sprite";
always_output = true;
surf_array = [];
@ -103,8 +102,8 @@ function Node_Image_Sheet(_x, _y, _group = -1) : Node(_x, _y, _group) constructo
}
static drawOverlay = function(active, _x, _y, _s, _mx, _my, _snx, _sny) {
if(inputs[| 0].value_from == noone) return;
var _inSurf = inputs[| 0].getValue();
if(!is_surface(_inSurf)) return;
var _out = inputs[| 7].getValue();
var _spc = inputs[| 5].getValue();
@ -116,6 +115,7 @@ function Node_Image_Sheet(_x, _y, _group = -1) : Node(_x, _y, _group) constructo
}
var _amo = curr_amo[0] * curr_amo[1];
for(var i = _amo - 1; i >= 0; i--) {
var _f = getSpritePosition(i);
var _fx0 = _x + _f[0] * _s;
@ -244,13 +244,14 @@ function Node_Image_Sheet(_x, _y, _group = -1) : Node(_x, _y, _group) constructo
}
static update = function() {
if(inputs[| 0].value_from == noone) return;
var _inSurf = inputs[| 0].getValue();
if(!is_surface(_inSurf)) return;
var _outSurf = outputs[| 0].getValue();
var _dim = inputs[| 1].getValue();
var _amo = inputs[| 3].getValue();
var _off = inputs[| 4].getValue();
var _total = _amo[0] * _amo[1];
var _pad = inputs[| 6].getValue();
@ -259,11 +260,16 @@ function Node_Image_Sheet(_x, _y, _group = -1) : Node(_x, _y, _group) constructo
var _out = inputs[| 7].getValue();
curr_dim = _dim;
curr_amo = _amo;
curr_off = _off;
if(_out == 0) {
update_on_frame = true;
inputs[| 8].setVisible(true);
var _spd = inputs[| 8].getValue();
inputs[| 8].setVisible(true);
inputs[| 11].setVisible(true);
var _spd = inputs[| 8].getValue();
_outSurf = surface_verify(_outSurf, ww, hh);
outputs[| 0].setValue(_outSurf);
@ -279,7 +285,8 @@ function Node_Image_Sheet(_x, _y, _group = -1) : Node(_x, _y, _group) constructo
surface_reset_target();
} else if(_out == 1) {
update_on_frame = false;
inputs[| 8].setVisible(false);
inputs[| 8].setVisible(false);
inputs[| 11].setVisible(false);
surf_array = array_create(_total);
for(var i = 0; i < _total; i++) {

View file

@ -281,27 +281,24 @@ function valueAnimator(_val, _prop) constructor {
else if(scale && _key[| 0] <= 1)
_time = round(_key[| 0] * (ANIMATOR.frames_total - 1));
var value = ds_list_get(_key, 1);
var ease_in = ds_list_get(_key, 2);
var ease_out = ds_list_get(_key, 3);
var ease_in_type = ds_list_get(_key, 4, CURVE_TYPE.bezier);
var ease_out_type = ds_list_get(_key, 5, CURVE_TYPE.bezier);
var _val = 0;
var t = typeArray(prop.display_type) && is_array(base);
var _val = _key[| 1];
if(t) {
if(is_string(_key[| 1])) {
_val = compat_path_array(_key[| 1]);
} else {
_val = array_create(array_length(base));
if(prop.type == VALUE_TYPE.path && prop.display_type == VALUE_DISPLAY.path_array) {
for(var j = 0; j < ds_list_size(value); j++)
_val[j] = value[| j];
} else if(typeArray(prop.display_type) && is_array(base)) {
_val = array_create(array_length(base));
if(ds_exists(_key[| 1], ds_type_list)) {
var ll = t == 1? min(array_length(base), ds_list_size(_key[| 1])) : ds_list_size(_key[| 1]);
for(var j = 0; j < ll; j++)
_val[j] = processValue(_key[| 1][| j]);
}
if(ds_exists(_key[| 1], ds_type_list)) {
for(var j = 0; j < ds_list_size(_key[| 1]); j++)
_val[j] = processValue(value[| j]);
}
} else
_val = _key[| 1];
}
var vk = new valueKey(_time, _val, self, ease_in, ease_out);
vk.ease_in_type = ease_in_type;

View file

@ -9,7 +9,7 @@ function Node_Mirror(_x, _y, _group = -1) : Node_Processor(_x, _y, _group) const
inputs[| 0] = nodeValue(0, "Surface in", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, 0);
inputs[| 1] = nodeValue(1, "Position", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 0, 0 ])
.setDisplay(VALUE_DISPLAY.vector)
.setUnitRef(function(index) { return getDimension(0, index); });
.setUnitRef(function(index) { return getDimension(index); });
inputs[| 2] = nodeValue(2, "Angle", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0)
.setDisplay(VALUE_DISPLAY.rotation);

View file

@ -17,7 +17,7 @@ function Node_Noise_Aniso(_x, _y, _group = -1) : Node_Processor(_x, _y, _group)
inputs[| 3] = nodeValue(3, "Position", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 0, 0 ])
.setDisplay(VALUE_DISPLAY.vector)
.setUnitRef(function(index) { return getDimension(0, index); });
.setUnitRef(function(index) { return getDimension(index); });
inputs[| 4] = nodeValue(4, "Rotation", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0)
.setDisplay(VALUE_DISPLAY.rotation);

View file

@ -6,7 +6,7 @@ function Node_Cellular(_x, _y, _group = -1) : Node_Processor(_x, _y, _group) con
inputs[| 1] = nodeValue(1, "Position", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ def_surf_size / 2, def_surf_size / 2])
.setDisplay(VALUE_DISPLAY.vector)
.setUnitRef(function(index) { return getDimension(0, index); });
.setUnitRef(function(index) { return getDimension(index); });
inputs[| 2] = nodeValue(2, "Scale", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 4);

View file

@ -15,7 +15,7 @@ function Node_Grid_Noise(_x, _y, _group = -1) : Node_Processor(_x, _y, _group) c
inputs[| 1] = nodeValue(1, "Position", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 0, 0 ])
.setDisplay(VALUE_DISPLAY.vector)
.setUnitRef(function(index) { return getDimension(0, index); });
.setUnitRef(function(index) { return getDimension(index); });
inputs[| 2] = nodeValue(2, "Scale", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 8, 8 ])
.setDisplay(VALUE_DISPLAY.vector);

View file

@ -19,7 +19,7 @@ function Node_Normal_Light(_x, _y, _group = -1) : Node_Processor(_x, _y, _group)
inputs[| 4] = nodeValue(4, "Light position", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 0, 0, -1 ])
.setDisplay(VALUE_DISPLAY.vector)
.setUnitRef(function(index) { return getDimension(0, index); });
.setUnitRef(function(index) { return getDimension(index); });
inputs[| 5] = nodeValue(5, "Light range", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 16);
inputs[| 6] = nodeValue(6, "Light intensity", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 32);

View file

@ -1,11 +1,12 @@
function Node_Padding(_x, _y, _group = -1) : Node_Processor(_x, _y, _group) constructor {
name = "Padding";
dimension_index = -1;
inputs[| 0] = nodeValue(0, "Surface in", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, 0);
inputs[| 1] = nodeValue(1, "Padding", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, [0, 0, 0, 0])
.setDisplay(VALUE_DISPLAY.padding)
.setUnitRef(function(index) { return getDimension(0, index); });
.setUnitRef(function(index) { return getDimension(index); });
outputs[| 0] = nodeValue(0, "Surface out", self, JUNCTION_CONNECT.output, VALUE_TYPE.surface, PIXEL_SURFACE);

View file

@ -14,7 +14,7 @@ function Node_Perlin(_x, _y, _group = -1) : Node_Processor(_x, _y, _group) const
inputs[| 1] = nodeValue(1, "Position", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 0, 0 ])
.setDisplay(VALUE_DISPLAY.vector)
.setUnitRef(function(index) { return getDimension(0, index); });
.setUnitRef(function(index) { return getDimension(index); });
inputs[| 2] = nodeValue(2, "Scale", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 5, 5 ])
.setDisplay(VALUE_DISPLAY.vector);

View file

@ -13,7 +13,7 @@ function Node_Perlin_Smear(_x, _y, _group = -1) : Node_Processor(_x, _y, _group)
inputs[| 1] = nodeValue(1, "Position", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 0, 0 ])
.setDisplay(VALUE_DISPLAY.vector)
.setUnitRef(function(index) { return getDimension(0, index); });
.setUnitRef(function(index) { return getDimension(index); });
inputs[| 2] = nodeValue(2, "Scale", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 4, 6])
.setDisplay(VALUE_DISPLAY.vector);

View file

@ -4,27 +4,39 @@ enum ARRAY_PROCESS {
}
function Node_Processor(_x, _y, _group = -1) : Node(_x, _y, _group) constructor {
array_process = ARRAY_PROCESS.loop;
current_data = [];
process_amount = 0;
inputs_data = [];
array_process = ARRAY_PROCESS.loop;
current_data = [];
process_amount = 0;
inputs_data = [];
dimension_index = 0;
icon = THEME.node_processor;
static process_data = function(_outSurf, _data, _output_index) { return _outSurf; }
static getDimension = function(index = 0, arr = 0) {
if(array_length(inputs_data) == 0) return [1, 1];
static getSingleValue = function(_index, _arr = 0) {
var _n = inputs[| _index];
var _in = _n.getValue();
var _inSurf = process_amount == 0? inputs_data[index] : inputs_data[index][arr];
if(is_surface(_inSurf)) {
var ww = surface_get_width(_inSurf);
var hh = surface_get_height(_inSurf);
if(_n.isArray())
return _in[_arr % array_length(_in)];
return _in;
}
static getDimension = function(arr = 0) {
if(dimension_index == -1) return [1, 1];
var _in = getSingleValue(dimension_index, arr);
if(_n.type == VALUE_TYPE.surface && is_surface(_in)) {
var ww = surface_get_width(_in);
var hh = surface_get_height(_in);
return [ww, hh];
}
if(is_array(_inSurf) && array_length(_inSurf) == 2)
return _inSurf;
if(is_array(_in) && array_length(_in) == 2)
return _in;
return [1, 1];
}
@ -41,10 +53,17 @@ function Node_Processor(_x, _y, _group = -1) : Node(_x, _y, _group) constructor
_out = _out[0];
}
if(inputs[| 0].type == VALUE_TYPE.surface && is_surface(inputs_data[0])) { //match surface size
var _ww = surface_get_width(inputs_data[0]);
var _hh = surface_get_height(inputs_data[0]);
_out = surface_verify(_out, _ww, _hh);
if(outputs[| outIndex].type == VALUE_TYPE.surface && dimension_index > -1) {
var surf = inputs_data[dimension_index];
var _sw = 1, _sh = 1;
if(inputs[| dimension_index].type == VALUE_TYPE.surface && is_surface(surf)) {
_sw = surface_get_width(surf);
_sh = surface_get_height(surf);
} else if(is_array(surf)) {
_sw = surf[0];
_sh = surf[1];
}
_out = surface_verify(_out, _sw, _sh);
}
current_data = inputs_data;
@ -79,14 +98,23 @@ function Node_Processor(_x, _y, _group = -1) : Node(_x, _y, _group) constructor
_data[i] = _in[_index];
}
if(inputs[| 0].type == VALUE_TYPE.surface && is_surface(_data[0])) { //match surface size
var _ww = surface_get_width(_data[0]);
var _hh = surface_get_height(_data[0]);
_out[l] = surface_verify(_out[l], _ww, _hh);
if(outputs[| outIndex].type == VALUE_TYPE.surface && dimension_index > -1) {
var surf = _data[dimension_index];
var _sw = 1, _sh = 1;
if(inputs[| dimension_index].type == VALUE_TYPE.surface && is_surface(surf)) {
_sw = surface_get_width(surf);
_sh = surface_get_height(surf);
} else if(is_array(surf)) {
_sw = surf[0];
_sh = surf[1];
}
_out[l] = surface_verify(_out[l], _sw, _sh);
}
if(l == preview_index)
current_data = _data;
_out[l] = process_data(_out[l], _data, outIndex);
if(l == preview_index) current_data = _data;
}
return _out;

View file

@ -14,7 +14,7 @@ function Node_Shadow(_x, _y, _group = -1) : Node_Processor(_x, _y, _group) const
inputs[| 3] = nodeValue(3, "Shift", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, [ 4, 4 ])
.setDisplay(VALUE_DISPLAY.vector)
.setUnitRef(function(index) { return getDimension(0, index); });
.setUnitRef(function(index) { return getDimension(index); });
inputs[| 4] = nodeValue(4, "Grow", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 3)
.setDisplay(VALUE_DISPLAY.slider, [0, 16, 1]);

View file

@ -1,5 +1,6 @@
function Node_Sprite_Stack(_x, _y, _group = -1) : Node_Processor(_x, _y, _group) constructor {
name = "Sprite Stack";
dimension_index = 1;
inputs[| 0] = nodeValue(0, "Base shape", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, PIXEL_SURFACE);
@ -12,7 +13,7 @@ function Node_Sprite_Stack(_x, _y, _group = -1) : Node_Processor(_x, _y, _group)
inputs[| 4] = nodeValue(4, "Position", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, [ 0, 0 ] )
.setDisplay(VALUE_DISPLAY.vector)
.setUnitRef(function(index) { return getDimension(1, index); });
.setUnitRef(function(index) { return getDimension(index); });
inputs[| 5] = nodeValue(5, "Rotation", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0 )
.setDisplay(VALUE_DISPLAY.rotation);

View file

@ -28,7 +28,7 @@ function Node_Stripe(_x, _y, _group = -1) : Node_Processor(_x, _y, _group) const
inputs[| 4] = nodeValue(4, "Position", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, [0, 0] )
.setDisplay(VALUE_DISPLAY.vector)
.setUnitRef(function(index) { return getDimension(0, index); });
.setUnitRef(function(index) { return getDimension(index); });
inputs[| 5] = nodeValue(5, "Random", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0)
.setDisplay(VALUE_DISPLAY.slider, [0, 1, 0.01]);

View file

@ -13,15 +13,14 @@ function Node_Transform(_x, _y, _group = -1) : Node_Processor(_x, _y, _group) co
.setDisplay(VALUE_DISPLAY.vector)
.setVisible(false);
inputs[| 2] = nodeValue(2, "Position", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 0, 0 ])
inputs[| 2] = nodeValue(2, "Position", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 0.5, 0.5 ])
.setDisplay(VALUE_DISPLAY.vector)
.setUnitRef(function(index) { return getDimension(index); });
.setUnitRef(function(index) { return getDimension(index); }, VALUE_UNIT.reference);
inputs[| 3] = nodeValue(3, "Anchor", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 0, 0 ])
inputs[| 3] = nodeValue(3, "Anchor", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 0.5, 0.5 ])
.setDisplay(VALUE_DISPLAY.vector, button(function() { centerAnchor(); })
.setIcon(THEME.anchor)
.setTooltip("Set to center"))
.setUnitRef(function(index) { return getDimension(index); });
.setTooltip("Set to center"));
inputs[| 4] = nodeValue(4, "Relative anchor", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, true);
@ -53,13 +52,10 @@ function Node_Transform(_x, _y, _group = -1) : Node_Processor(_x, _y, _group) co
vel = 0;
prev_pos = [0, 0];
static getDimension = function(index) {
if(array_length(inputs_data) == 0) return [1, 1];
var _surf = process_amount == 0? inputs_data[0] : inputs_data[0][index];
var _out_type = process_amount == 0? inputs_data[9] : inputs_data[9][index];
var _out = process_amount == 0? inputs_data[1] : inputs_data[1][index];
static getDimension = function(arr) {
var _surf = getSingleValue(0, arr);
var _out_type = getSingleValue(9, arr);
var _out = getSingleValue(1, arr);
var ww, hh;
switch(_out_type) {
@ -76,7 +72,7 @@ function Node_Transform(_x, _y, _group = -1) : Node_Processor(_x, _y, _group) co
hh = _out[1];
break;
}
return [ww, hh];
}
@ -110,26 +106,24 @@ function Node_Transform(_x, _y, _group = -1) : Node_Processor(_x, _y, _group) co
break;
}
var _pos = inputs[| 3].getValue();
inputs[| 2].setValue([ surface_get_width(_surf) / 2, surface_get_height(_surf) / 2 ]); //position
inputs[| 3].setValue([ ww / 2, hh / 2]); //anchor
inputs[| 3].setValue([ 0.5, 0.5]);
inputs[| 2].setValue([ surface_get_width(_surf) / 2, surface_get_height(_surf) / 2 ]);
}
static step = function() {
var pos = inputs[| 2].getValue();
if(ANIMATOR.frame_progress) {
if(ANIMATOR.current_frame == 0) {
vel = 0;
prev_pos[0] = pos[0];
prev_pos[1] = pos[1];
} else {
vel = point_direction(prev_pos[0], prev_pos[1], pos[0], pos[1]);
if(!ANIMATOR.frame_progress) return;
if(ANIMATOR.current_frame == 0) {
vel = 0;
prev_pos[0] = pos[0];
prev_pos[1] = pos[1];
} else {
vel = point_direction(prev_pos[0], prev_pos[1], pos[0], pos[1]);
prev_pos[0] = pos[0];
prev_pos[1] = pos[1];
}
prev_pos[0] = pos[0];
prev_pos[1] = pos[1];
}
}
@ -154,7 +148,7 @@ function Node_Transform(_x, _y, _group = -1) : Node_Processor(_x, _y, _group) co
var hh = surface_get_height(ins);
var _ww = ww, _hh = hh;
if(_ww <= 1 && _hh <= 1) return _outSurf;
switch(out_type) {
case OUTPUT_SCALING.same_as_input :
inputs[| 1].setVisible(false);
@ -173,6 +167,9 @@ function Node_Transform(_x, _y, _group = -1) : Node_Processor(_x, _y, _group) co
if(_ww <= 0 || _hh <= 0) return;
_outSurf = surface_verify(_outSurf, _ww, _hh);
anc[0] *= ww * sca[0];
anc[1] *= hh * sca[1];
pos[0] -= anc[0];
pos[1] -= anc[1];
@ -237,7 +234,10 @@ function Node_Transform(_x, _y, _group = -1) : Node_Processor(_x, _y, _group) co
return _outSurf;
}
doUpdate();
overlay_dragging = 0;
corner_dragging = 0;
overlay_drag_mx = 0;
overlay_drag_my = 0;
overlay_drag_sx = 0;
@ -262,7 +262,8 @@ function Node_Transform(_x, _y, _group = -1) : Node_Processor(_x, _y, _group) co
var pos = current_data[2];
var anc = current_data[3];
var anc = current_data[3];
var _anc = current_data[3];
var rot = current_data[5];
var sca = current_data[6];
@ -276,6 +277,9 @@ function Node_Transform(_x, _y, _group = -1) : Node_Processor(_x, _y, _group) co
var ww = srw * sca[0];
var hh = srh * sca[1];
anc[0] *= ww;
anc[1] *= hh;
var _pos = [ pos[0], pos[1] ];
pos[0] -= anc[0];
pos[1] -= anc[1];
@ -345,12 +349,7 @@ function Node_Transform(_x, _y, _group = -1) : Node_Processor(_x, _y, _group) co
if(inputs[| 2].setValue([ pos_x, pos_y ]))
UNDO_HOLDING = true;
} else if(overlay_dragging == 2) {
if(arl) {
pos_x /= ww;
pos_y /= hh;
}
if(inputs[| 3].setValue([ pos_x, pos_y ]))
if(inputs[| 3].setValue([ pos_x / ww, pos_y / hh ]))
UNDO_HOLDING = true;
}
@ -376,17 +375,28 @@ function Node_Transform(_x, _y, _group = -1) : Node_Processor(_x, _y, _group) co
UNDO_HOLDING = false;
}
} else if(overlay_dragging == 4) {
var _dist = point_distance (overlay_drag_mx, overlay_drag_my, bax, bay);
var _dirr = point_direction(overlay_drag_mx, overlay_drag_my, bax, bay);
var _p = point_rotate(_mx - overlay_drag_mx, _my - overlay_drag_my, 0, 0, -rot);
var dist = point_distance (_mx, _my, bax, bay);
var dirr = point_direction(_mx, _my, bax, bay);
var _sw = _p[0] / _s / srw;
var _sh = _p[1] / _s / srh;
var sw, sh;
var sw = (lengthdir_x(dist, dirr) - lengthdir_x(_dist, _dirr)) / _s / srw;
var sh = (lengthdir_y(dist, dirr) - lengthdir_y(_dist, _dirr)) / _s / srh;
if(corner_dragging == 0) {
sw = -_sw / _anc[0];
sh = -_sh / _anc[1];
} else if(corner_dragging == 1) {
sw = _sw / (1 - _anc[0]);
sh = -_sh / _anc[1];
} else if(corner_dragging == 2) {
sw = -_sw / _anc[0];
sh = _sh / (1 - _anc[1]);
} else if(corner_dragging == 3) {
sw = _sw / (1 - _anc[0]);
sh = _sh / (1 - _anc[1]);
}
var _sw = overlay_drag_sx - sw;
var _sh = overlay_drag_sy - sh;
var _sw = overlay_drag_sx + sw;
var _sh = overlay_drag_sy + sh;
if(keyboard_check(vk_shift)) {
_sw = max(_sw, _sh);
@ -411,6 +421,12 @@ function Node_Transform(_x, _y, _group = -1) : Node_Processor(_x, _y, _group) co
overlay_drag_sy = anc[1];
} else if(point_in_circle(_mx, _my, tl[0], tl[1], 8) || point_in_circle(_mx, _my, tr[0], tr[1], 8) || point_in_circle(_mx, _my, bl[0], bl[1], 8) || point_in_circle(_mx, _my, br[0], br[1], 8)) {
overlay_dragging = 4;
if(point_in_circle(_mx, _my, tl[0], tl[1], 8)) corner_dragging = 0;
else if(point_in_circle(_mx, _my, tr[0], tr[1], 8)) corner_dragging = 1;
else if(point_in_circle(_mx, _my, bl[0], bl[1], 8)) corner_dragging = 2;
else if(point_in_circle(_mx, _my, br[0], br[1], 8)) corner_dragging = 3;
overlay_drag_mx = _mx;
overlay_drag_my = _my;
overlay_drag_sx = sca[0];

View file

@ -11,7 +11,7 @@ function Node_Twirl(_x, _y, _group = -1) : Node_Processor(_x, _y, _group) constr
inputs[| 0] = nodeValue(0, "Surface in", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, 0);
inputs[| 1] = nodeValue(1, "Center", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 0, 0 ])
.setDisplay(VALUE_DISPLAY.vector)
.setUnitRef(function(index) { return getDimension(0, index); });
.setUnitRef(function(index) { return getDimension(index); });
inputs[| 2] = nodeValue(2, "Strength", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 3)
.setDisplay(VALUE_DISPLAY.slider, [-10, 10, 0.01]);

View file

@ -202,17 +202,18 @@ function nodeValueUnit(value) constructor {
var base = reference(index);
var inv = unitTo == VALUE_UNIT.reference;
if(!is_array(value) && !is_array(base))
if(!is_array(base) && !is_array(value))
return inv? value / base : value * base;
if(is_array(value) && !is_array(base)) {
if(!is_array(base) && is_array(value)) {
for( var i = 0; i < array_length(value); i++ )
value[i] = inv? value[i] / base : value[i] * base;
return value;
}
if(!is_array(value) && is_array(base))
if(is_array(base) && !is_array(value)) {
return value;
}
switch(disp) {
case VALUE_DISPLAY.padding :
@ -261,8 +262,9 @@ function NodeValue(_index, _name, _node, _connect, _type, _value, _tag = VALUE_T
value_validation = VALIDATION.pass;
static setUnitRef = function(ref) {
static setUnitRef = function(ref, mode = VALUE_UNIT.constant) {
unit.reference = ref;
unit.mode = mode;
return self;
}
@ -499,6 +501,7 @@ function NodeValue(_index, _name, _node, _connect, _type, _value, _tag = VALUE_T
switch(display_type) {
case VALUE_DISPLAY.path_load:
var path = animator.getValue();
if(is_array(path)) path = path[0];
if(try_get_path(path) == -1) {
value_validation = VALIDATION.error;
str = "File not exist";
@ -508,10 +511,9 @@ function NodeValue(_index, _name, _node, _connect, _type, _value, _tag = VALUE_T
var paths = animator.getValue();
if(is_array(paths)) {
for( var i = 0; i < array_length(paths); i++ ) {
if(try_get_path(paths[i]) == -1) {
value_validation = VALIDATION.error;
str = "File not exist";
}
if(try_get_path(paths[i]) != -1) continue;
value_validation = VALIDATION.error;
str = "File not exist";
}
} else {
value_validation = VALIDATION.error;
@ -521,9 +523,12 @@ function NodeValue(_index, _name, _node, _connect, _type, _value, _tag = VALUE_T
}
break;
}
node.onValidate();
if(_val != value_validation) {
if(_val == value_validation) return self;
#region notification
if(value_validation == VALIDATION.error && error_notification == noone) {
error_notification = noti_error(str);
error_notification.onClick = function() { PANEL_GRAPH.node_focus = node; };
@ -533,7 +538,7 @@ function NodeValue(_index, _name, _node, _connect, _type, _value, _tag = VALUE_T
noti_remove(error_notification);
error_notification = noone;
}
}
#endregion
return self;
}
@ -1297,13 +1302,14 @@ function NodeValue(_index, _name, _node, _connect, _type, _value, _tag = VALUE_T
unit.mode = ds_map_try_get(_map, "unit", VALUE_UNIT.constant);
animator.deserialize(_map[? "raw value"], scale);
animator.is_anim = _map[? "anim"];
con_node = _map[? "from node"];
con_index = _map[? "from index"];
if(ds_map_exists(_map, "data"))
ds_list_copy(extra_data, _map[? "data"]);
onValidate();
}

View file

@ -5,19 +5,19 @@ function Node_Warp(_x, _y, _group = -1) : Node_Processor(_x, _y, _group) constru
inputs[| 1] = nodeValue(1, "Top left", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 0, 0 ] )
.setDisplay(VALUE_DISPLAY.vector)
.setUnitRef(function(index) { return getDimension(0, index); });
.setUnitRef(function(index) { return getDimension(index); });
inputs[| 2] = nodeValue(2, "Top right", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ def_surf_size, 0 ] )
.setDisplay(VALUE_DISPLAY.vector)
.setUnitRef(function(index) { return getDimension(0, index); });
.setUnitRef(function(index) { return getDimension(index); });
inputs[| 3] = nodeValue(3, "Bottom left", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 0, def_surf_size ] )
.setDisplay(VALUE_DISPLAY.vector)
.setUnitRef(function(index) { return getDimension(0, index); });
.setUnitRef(function(index) { return getDimension(index); });
inputs[| 4] = nodeValue(4, "Bottom right", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ def_surf_size, def_surf_size ] )
.setDisplay(VALUE_DISPLAY.vector)
.setUnitRef(function(index) { return getDimension(0, index); });
.setUnitRef(function(index) { return getDimension(index); });
outputs[| 0] = nodeValue(0, "Surface out", self, JUNCTION_CONNECT.output, VALUE_TYPE.surface, PIXEL_SURFACE);

View file

@ -4,7 +4,7 @@ function Node_Wrap_Area(_x, _y, _group = -1) : Node_Processor(_x, _y, _group) co
inputs[| 0] = nodeValue(0, "Surface in", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, 0);
inputs[| 1] = nodeValue(1, "Area", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, [ 16, 16, 4, 4, AREA_SHAPE.rectangle ])
.setDisplay(VALUE_DISPLAY.area)
.setUnitRef(function(index) { return getDimension(0, index); });;
.setUnitRef(function(index) { return getDimension(index); });;
outputs[| 0] = nodeValue(0, "Surface out", self, JUNCTION_CONNECT.output, VALUE_TYPE.surface, PIXEL_SURFACE);
@ -14,7 +14,11 @@ function Node_Wrap_Area(_x, _y, _group = -1) : Node_Processor(_x, _y, _group) co
static process_data = function(_outSurf, _data, _output_index) {
var _inSurf = _data[0];
if(!is_surface(_inSurf)) return _outSurf;
var _area = _data[1];
if(!is_array(_area) && array_length(_area) < 4)
return _outSurf;
var cx = _area[0];
var cy = _area[1];

View file

@ -17,7 +17,7 @@ function Node_Zigzag(_x, _y, _group = -1) : Node_Processor(_x, _y, _group) const
inputs[| 2] = nodeValue(2, "Position", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, [0, 0] )
.setDisplay(VALUE_DISPLAY.vector)
.setUnitRef(function(index) { return getDimension(0, index); });
.setUnitRef(function(index) { return getDimension(index); });
inputs[| 3] = nodeValue(3, "Color 1", self, JUNCTION_CONNECT.input, VALUE_TYPE.color, c_white);
inputs[| 4] = nodeValue(4, "Color 2", self, JUNCTION_CONNECT.input, VALUE_TYPE.color, c_black);

View file

@ -48,7 +48,7 @@ function paddingBox(_onModify, _unit = noone) constructor {
var bx = _x - ui(80);
var by = _y - ui(24);
b_link.draw(bx, by, ui(32), ui(32), _m, THEME.button_hide);
b_link.draw(bx + ui(4), by + ui(4), ui(24), ui(24), _m, THEME.button_hide);
if(unit != noone && unit.reference != noone) {
unit.triggerButton.hover = hover;

View file

@ -328,11 +328,11 @@ function Panel_Inspector() : PanelContent() constructor {
case VALUE_DISPLAY.path_array :
var val = jun.showValue(), txt = "";
var pathExist = jun.value_validation == VALIDATION.pass;
if(is_array(val))
if(is_array(val) && array_length(val))
txt = "[" + string(array_length(val)) + "] " + val[0];
else
txt = val;
txt = string(val);
jun.editWidget.draw(editBoxX, editBoxY, editBoxW, editBoxH, _m,, pathExist? COLORS._main_text : COLORS._main_value_negative);
var icx = editBoxX + editBoxW - ui(16);

View file

@ -1,11 +1,10 @@
function try_get_path(path) {
if(!file_exists(path)) {
var local_path = filename_dir(CURRENT_PATH) + "\\" + path;
if(file_exists(local_path))
return local_path;
else
return -1;
}
if(file_exists(path))
return path;
var local_path = filename_dir(CURRENT_PATH) + "\\" + path;
if(file_exists(local_path))
return local_path;
return path;
return -1;
}

View file

@ -4,7 +4,7 @@ enum RENDER_TYPE {
full = 2
}
global.RENDER_LOG = false;
global.RENDER_LOG = true;
function __nodeLeafList(_list, _stack) {
for( var i = 0; i < ds_list_size(_list); i++ ) {

View file

@ -59,7 +59,7 @@ function vectorBox(_size, _type, _onModify, _unit = noone) constructor {
var bx = _x;
var by = _y + _h / 2 - ui(32 / 2);
b_link.draw(bx, by, ui(32), ui(32), _m, THEME.button_hide);
b_link.draw(bx + ui(4), by + ui(4), ui(24), ui(24), _m, THEME.button_hide);
_x += ui(28);
_w -= ui(28);