mirror of
https://github.com/Ttanasart-pt/Pixel-Composer.git
synced 2024-12-23 21:46:17 +01:00
Add channel selector to several filter nodes
This commit is contained in:
parent
1f6eab6a69
commit
320ba73b40
51 changed files with 256 additions and 77 deletions
|
@ -494,6 +494,7 @@
|
|||
{"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"s_youtube.png","CopyToMask":-1,"filePath":"datafiles/data/themes/default/graphics/icon",},
|
||||
{"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"graphics x2.ai","CopyToMask":-1,"filePath":"datafiles/data/themes/default/graphics/inspector",},
|
||||
{"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"s_inspector_area_strip2.png","CopyToMask":-1,"filePath":"datafiles/data/themes/default/graphics/inspector",},
|
||||
{"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"s_inspector_channel.png","CopyToMask":-1,"filePath":"datafiles/data/themes/default/graphics/inspector",},
|
||||
{"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"s_inspector_corner.png","CopyToMask":-1,"filePath":"datafiles/data/themes/default/graphics/inspector",},
|
||||
{"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"s_inspector_direction.png","CopyToMask":-1,"filePath":"datafiles/data/themes/default/graphics/inspector",},
|
||||
{"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"s_inspector_draw_line.png","CopyToMask":-1,"filePath":"datafiles/data/themes/default/graphics/inspector",},
|
||||
|
|
Binary file not shown.
|
@ -11,6 +11,9 @@
|
|||
#endregion
|
||||
|
||||
#region window
|
||||
window_set_min_width(960);
|
||||
window_set_min_height(600);
|
||||
|
||||
if(OS == os_windows) {
|
||||
gameframe_init();
|
||||
gameframe_set_cursor = false;
|
||||
|
|
|
@ -361,7 +361,7 @@
|
|||
[ "window_set_fullscreen", window_set_fullscreen ],
|
||||
[ "window_set_position", window_set_position ],
|
||||
[ "window_set_size", window_set_size ],
|
||||
[ "window_set_rectangle", window_set_rectangle ],
|
||||
[ "gameframe_drag_set_rect", gameframe_drag_set_rect ],
|
||||
[ "window_set_cursor", window_set_cursor ],
|
||||
[ "window_set_min_width", window_set_min_width ],
|
||||
[ "window_set_max_width", window_set_max_width ],
|
||||
|
|
|
@ -9,6 +9,7 @@
|
|||
#macro ANIMATION_STATIC !(PROJECT.animator.is_playing || PROJECT.animator.frame_progress)
|
||||
#macro IS_PLAYING PROJECT.animator.is_playing
|
||||
#macro CURRENT_FRAME PROJECT.animator.current_frame
|
||||
#macro LAST_FRAME (CURRENT_FRAME == TOTAL_FRAMES - 1)
|
||||
#macro TOTAL_FRAMES PROJECT.animator.frames_total
|
||||
#macro RENDERING PROJECT.animator.rendering
|
||||
#macro IS_RENDERING array_length(PROJECT.animator.rendering)
|
||||
|
|
|
@ -569,7 +569,7 @@ function gameframe_tools_rect_get_window_rect(_this1) {
|
|||
|
||||
function gameframe_tools_rect_set_window_rect(_this1) {
|
||||
// gameframe_tools_rect_set_window_rect(this:tools_GfRectImpl)
|
||||
window_set_rectangle(_this1[0/* x */], _this1[1/* y */], _this1[2/* width */], _this1[3/* height */]);
|
||||
gameframe_drag_set_rect(_this1[0/* x */], _this1[1/* y */], _this1[2/* width */], _this1[3/* height */]);
|
||||
}
|
||||
|
||||
function gameframe_tools_rect_equals(_this1, _o) {
|
||||
|
@ -959,7 +959,7 @@ function gameframe_drag_stop() {
|
|||
|
||||
function gameframe_drag_set_rect(_x, _y, _w, _h) {
|
||||
// gameframe_drag_set_rect(x:int, y:int, w:int, h:int)
|
||||
window_set_rectangle(_x, _y, _w, _h);
|
||||
window_set_rectangle(_x, _y, max(960, _w), max(600, _h));
|
||||
}
|
||||
|
||||
function gameframe_drag_update() {
|
||||
|
@ -985,34 +985,34 @@ function gameframe_drag_update() {
|
|||
var __y = gameframe_drag_my - gameframe_drag_top;
|
||||
if (gameframe_drag_mx - gameframe_drag_left < (gameframe_drag_right - gameframe_drag_left) / 2) __x = min(gameframe_drag_mx - gameframe_drag_left, (gameframe_restoreRect_hx[2/* width */] >> 1)); else __x = max(gameframe_restoreRect_hx[2/* width */] + gameframe_drag_mx - gameframe_drag_right, (gameframe_restoreRect_hx[2/* width */] >> 1));
|
||||
gameframe_isMaximized_hx = false;
|
||||
window_set_rectangle(__mx - __x, __my - __y, gameframe_restoreRect_hx[2/* width */], gameframe_restoreRect_hx[3/* height */]);
|
||||
gameframe_drag_set_rect(__mx - __x, __my - __y, gameframe_restoreRect_hx[2/* width */], gameframe_restoreRect_hx[3/* height */]);
|
||||
gameframe_drag_start(16);
|
||||
}
|
||||
break;
|
||||
case 1:
|
||||
var __x = __mx - (gameframe_drag_mx - gameframe_drag_left);
|
||||
window_set_rectangle(__x, gameframe_drag_top, gameframe_drag_right - __x, gameframe_drag_bottom - gameframe_drag_top);
|
||||
gameframe_drag_set_rect(__x, gameframe_drag_top, gameframe_drag_right - __x, gameframe_drag_bottom - gameframe_drag_top);
|
||||
break;
|
||||
case 2:
|
||||
var __y = __my - (gameframe_drag_my - gameframe_drag_top);
|
||||
window_set_rectangle(gameframe_drag_left, __y, gameframe_drag_right - gameframe_drag_left, gameframe_drag_bottom - __y);
|
||||
gameframe_drag_set_rect(gameframe_drag_left, __y, gameframe_drag_right - gameframe_drag_left, gameframe_drag_bottom - __y);
|
||||
break;
|
||||
case 4: window_set_rectangle(gameframe_drag_left, gameframe_drag_top, gameframe_drag_right - gameframe_drag_left - gameframe_drag_mx + __mx, gameframe_drag_bottom - gameframe_drag_top); break;
|
||||
case 8: window_set_rectangle(gameframe_drag_left, gameframe_drag_top, gameframe_drag_right - gameframe_drag_left, gameframe_drag_bottom - gameframe_drag_top - gameframe_drag_my + __my); break;
|
||||
case 4: gameframe_drag_set_rect(gameframe_drag_left, gameframe_drag_top, gameframe_drag_right - gameframe_drag_left - gameframe_drag_mx + __mx, gameframe_drag_bottom - gameframe_drag_top); break;
|
||||
case 8: gameframe_drag_set_rect(gameframe_drag_left, gameframe_drag_top, gameframe_drag_right - gameframe_drag_left, gameframe_drag_bottom - gameframe_drag_top - gameframe_drag_my + __my); break;
|
||||
case 3:
|
||||
var __x = __mx - (gameframe_drag_mx - gameframe_drag_left);
|
||||
var __y = __my - (gameframe_drag_my - gameframe_drag_top);
|
||||
window_set_rectangle(__x, __y, gameframe_drag_right - __x, gameframe_drag_bottom - __y);
|
||||
gameframe_drag_set_rect(__x, __y, gameframe_drag_right - __x, gameframe_drag_bottom - __y);
|
||||
break;
|
||||
case 9:
|
||||
var __x = __mx - (gameframe_drag_mx - gameframe_drag_left);
|
||||
window_set_rectangle(__x, gameframe_drag_top, gameframe_drag_right - __x, gameframe_drag_bottom - gameframe_drag_top - gameframe_drag_my + __my);
|
||||
gameframe_drag_set_rect(__x, gameframe_drag_top, gameframe_drag_right - __x, gameframe_drag_bottom - gameframe_drag_top - gameframe_drag_my + __my);
|
||||
break;
|
||||
case 6:
|
||||
var __y = __my - (gameframe_drag_my - gameframe_drag_top);
|
||||
window_set_rectangle(gameframe_drag_left, __y, gameframe_drag_right - gameframe_drag_left - gameframe_drag_mx + __mx, gameframe_drag_bottom - __y);
|
||||
gameframe_drag_set_rect(gameframe_drag_left, __y, gameframe_drag_right - gameframe_drag_left - gameframe_drag_mx + __mx, gameframe_drag_bottom - __y);
|
||||
break;
|
||||
case 12: window_set_rectangle(gameframe_drag_left, gameframe_drag_top, gameframe_drag_right - gameframe_drag_left - gameframe_drag_mx + __mx, gameframe_drag_bottom - gameframe_drag_top - gameframe_drag_my + __my); break;
|
||||
case 12: gameframe_drag_set_rect(gameframe_drag_left, gameframe_drag_top, gameframe_drag_right - gameframe_drag_left - gameframe_drag_mx + __mx, gameframe_drag_bottom - gameframe_drag_top - gameframe_drag_my + __my); break;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -41,7 +41,7 @@ function mac_window_maximize() {
|
|||
room_height = _h;
|
||||
|
||||
display_set_gui_size(_w, _h);
|
||||
window_set_rectangle(0, 0, _w, _h);
|
||||
gameframe_drag_set_rect(0, 0, _w, _h);
|
||||
|
||||
display_refresh();
|
||||
}
|
||||
|
@ -51,8 +51,6 @@ function mac_window_minimize() {
|
|||
|
||||
__win_is_maximized = false;
|
||||
|
||||
window_set_position(__win_min_x, __win_min_y);
|
||||
window_set_size(__win_min_w, __win_min_h);
|
||||
|
||||
gameframe_drag_set_rect(__win_min_x, __win_min_y, __win_min_w, __win_min_h);
|
||||
display_refresh();
|
||||
}
|
|
@ -9,16 +9,30 @@ function mac_window_step() {
|
|||
window_set_position(__win_drag_sx + (_mx - __win_drag_mx), __win_drag_sy + (_my - __win_drag_my));
|
||||
else {
|
||||
if((__win_is_dragging & WINDOW_DRAG_MODE.resize_n) != 0) {
|
||||
window_set_size(__win_drag_sw, __win_drag_sh - (_my - __win_drag_my));
|
||||
window_set_position(__win_drag_sx, __win_drag_sy + (_my - __win_drag_my));
|
||||
gameframe_drag_set_rect(
|
||||
__win_drag_sx,
|
||||
__win_drag_sy + (_my - __win_drag_my),
|
||||
__win_drag_sw,
|
||||
__win_drag_sh - (_my - __win_drag_my)
|
||||
);
|
||||
} else if((__win_is_dragging & WINDOW_DRAG_MODE.resize_s) != 0)
|
||||
window_set_size(__win_drag_sw, __win_drag_sh + (_my - __win_drag_my));
|
||||
|
||||
window_set_size(
|
||||
max(960, __win_drag_sw),
|
||||
max(600, __win_drag_sh + (_my - __win_drag_my))
|
||||
);
|
||||
|
||||
if((__win_is_dragging & WINDOW_DRAG_MODE.resize_w) != 0) {
|
||||
window_set_size(__win_drag_sw - (_mx - __win_drag_mx), __win_drag_sh);
|
||||
window_set_position(__win_drag_sx + (_mx - __win_drag_mx), __win_drag_sy);
|
||||
gameframe_drag_set_rect(
|
||||
__win_drag_sx + (_mx - __win_drag_mx),
|
||||
__win_drag_sy,
|
||||
__win_drag_sw - (_mx - __win_drag_mx),
|
||||
__win_drag_sh
|
||||
);
|
||||
} else if((__win_is_dragging & WINDOW_DRAG_MODE.resize_e) != 0)
|
||||
window_set_size(__win_drag_sw + (_mx - __win_drag_mx), __win_drag_sh);
|
||||
window_set_size(
|
||||
max(960, __win_drag_sw + (_mx - __win_drag_mx)),
|
||||
max(600, __win_drag_sh)
|
||||
);
|
||||
}
|
||||
|
||||
if(mouse_release(mb_left))
|
||||
|
|
|
@ -18,6 +18,30 @@ function mask_apply(original, edited, mask, mix = 1) {
|
|||
shader_reset();
|
||||
surface_reset_target();
|
||||
|
||||
surface_free(edited);
|
||||
return _s;
|
||||
}
|
||||
|
||||
function channel_apply(original, edited, channel) {
|
||||
if(channel == 0b1111) return edited;
|
||||
|
||||
var _f = surface_get_format(edited);
|
||||
var _s = surface_create_size(original, _f);
|
||||
|
||||
surface_set_target(_s);
|
||||
DRAW_CLEAR
|
||||
BLEND_ADD
|
||||
|
||||
gpu_set_colorwriteenable(!(channel & 0b0001), !(channel & 0b0010), !(channel & 0b0100), !(channel & 0b1000));
|
||||
draw_surface_safe(original);
|
||||
|
||||
gpu_set_colorwriteenable(channel & 0b0001, channel & 0b0010, channel & 0b0100, channel & 0b1000);
|
||||
draw_surface_safe(edited);
|
||||
|
||||
gpu_set_colorwriteenable(1, 1, 1, 1);
|
||||
BLEND_NORMAL
|
||||
surface_reset_target();
|
||||
|
||||
surface_free(edited);
|
||||
return _s;
|
||||
}
|
|
@ -216,6 +216,7 @@ function drawWidget(xx, yy, ww, _m, jun, global_var = true, _hover = false, _foc
|
|||
|
||||
var widH = breakLine? editBoxH : 0;
|
||||
var mbRight = true;
|
||||
var wid = jun.editWidget;
|
||||
|
||||
if(jun.expUse) { #region expression editor
|
||||
var expValid = jun.expTree != noone && jun.expTree.validate();
|
||||
|
@ -229,14 +230,14 @@ function drawWidget(xx, yy, ww, _m, jun, global_var = true, _hover = false, _foc
|
|||
var wd_h = jun.express_edit.draw(editBoxX, editBoxY, editBoxW, editBoxH, jun.expression, _m);
|
||||
widH = wd_h - (TEXTBOX_HEIGHT * !breakLine);
|
||||
#endregion
|
||||
} else if(jun.editWidget && jun.display_type != VALUE_DISPLAY.none) { #region edit widget
|
||||
jun.editWidget.setFocusHover(_focus, _hover);
|
||||
} else if(wid && jun.display_type != VALUE_DISPLAY.none) { #region edit widget
|
||||
wid.setFocusHover(_focus, _hover);
|
||||
|
||||
if(jun.connect_type == JUNCTION_CONNECT.input) {
|
||||
jun.editWidget.setInteract(!jun.hasJunctionFrom());
|
||||
if(_focus) jun.editWidget.register(_scrollPane);
|
||||
wid.setInteract(!jun.hasJunctionFrom());
|
||||
if(_focus) wid.register(_scrollPane);
|
||||
} else {
|
||||
jun.editWidget.setInteract(false);
|
||||
wid.setInteract(false);
|
||||
}
|
||||
|
||||
var _show = jun.showValue();
|
||||
|
@ -272,7 +273,7 @@ function drawWidget(xx, yy, ww, _m, jun, global_var = true, _hover = false, _foc
|
|||
break;
|
||||
}
|
||||
|
||||
var _widH = jun.editWidget.drawParam(param) ?? 0;
|
||||
var _widH = wid.drawParam(param) ?? 0;
|
||||
widH = _widH - (TEXTBOX_HEIGHT * !breakLine);
|
||||
#endregion
|
||||
} else if(jun.display_type == VALUE_DISPLAY.label) { #region label
|
||||
|
|
|
@ -14,7 +14,10 @@ function Node_Average(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) c
|
|||
inputs[| 3] = nodeValue("Active", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, true);
|
||||
active_index = 3;
|
||||
|
||||
input_display_list = [ 3,
|
||||
inputs[| 4] = nodeValue("Channel", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0b1111)
|
||||
.setDisplay(VALUE_DISPLAY.toggle, { data: array_create(4, THEME.inspector_channel) });
|
||||
|
||||
input_display_list = [ 3, 4,
|
||||
["Surfaces", false], 0, 1, 2,
|
||||
]
|
||||
|
||||
|
@ -75,6 +78,7 @@ function Node_Average(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) c
|
|||
surface_reset_target();
|
||||
|
||||
_outSurf = mask_apply(_data[0], _outSurf, _data[1], _data[2]);
|
||||
_outSurf = channel_apply(_data[0], _outSurf, _data[4]);
|
||||
colors[_array_index] = cc;
|
||||
|
||||
return _outSurf;
|
||||
|
|
|
@ -28,7 +28,10 @@ function Node_Bloom(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) con
|
|||
inputs[| 7] = nodeValue("Active", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, true);
|
||||
active_index = 7;
|
||||
|
||||
input_display_list = [ 7,
|
||||
inputs[| 8] = nodeValue("Channel", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0b1111)
|
||||
.setDisplay(VALUE_DISPLAY.toggle, { data: array_create(4, THEME.inspector_channel) });
|
||||
|
||||
input_display_list = [ 7, 8,
|
||||
["Surfaces", true], 0, 5, 6,
|
||||
["Bloom", false], 1, 2, 3, 4,
|
||||
]
|
||||
|
@ -81,6 +84,7 @@ function Node_Bloom(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) con
|
|||
surface_reset_target();
|
||||
|
||||
_outSurf = mask_apply(_data[0], _outSurf, _data[5], _data[6]);
|
||||
_outSurf = channel_apply(_data[0], _outSurf, _data[8]);
|
||||
|
||||
return _outSurf;
|
||||
}
|
||||
|
|
|
@ -20,9 +20,12 @@ function Node_Blur(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) cons
|
|||
inputs[| 7] = nodeValue("Active", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, true);
|
||||
active_index = 7;
|
||||
|
||||
inputs[| 8] = nodeValue("Channel", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0b1111)
|
||||
.setDisplay(VALUE_DISPLAY.toggle, { data: array_create(4, THEME.inspector_channel) });
|
||||
|
||||
outputs[| 0] = nodeValue("Surface out", self, JUNCTION_CONNECT.output, VALUE_TYPE.surface, noone);
|
||||
|
||||
input_display_list = [ 7,
|
||||
input_display_list = [ 7, 8,
|
||||
["Surfaces", true], 0, 5, 6,
|
||||
["Blur", false], 1, 3, 4,
|
||||
];
|
||||
|
@ -49,6 +52,7 @@ function Node_Blur(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) cons
|
|||
surface_reset_target();
|
||||
|
||||
_outSurf = mask_apply(_data[0], _outSurf, _mask, _mix);
|
||||
_outSurf = channel_apply(_data[0], _outSurf, _data[8]);
|
||||
|
||||
return _outSurf;
|
||||
} #endregion
|
||||
|
|
|
@ -18,7 +18,10 @@ function Node_Blur_Bokeh(_x, _y, _group = noone) : Node_Processor(_x, _y, _group
|
|||
inputs[| 4] = nodeValue("Active", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, true);
|
||||
active_index = 4;
|
||||
|
||||
input_display_list = [ 4,
|
||||
inputs[| 5] = nodeValue("Channel", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0b1111)
|
||||
.setDisplay(VALUE_DISPLAY.toggle, { data: array_create(4, THEME.inspector_channel) });
|
||||
|
||||
input_display_list = [ 4, 5,
|
||||
["Surfaces", true], 0, 2, 3,
|
||||
["Blur", false], 1,
|
||||
]
|
||||
|
@ -46,6 +49,7 @@ function Node_Blur_Bokeh(_x, _y, _group = noone) : Node_Processor(_x, _y, _group
|
|||
surface_reset_target();
|
||||
|
||||
_outSurf = mask_apply(_data[0], _outSurf, _mask, _mix);
|
||||
_outSurf = channel_apply(_data[0], _outSurf, _data[5]);
|
||||
|
||||
return _outSurf;
|
||||
} #endregion
|
||||
|
|
|
@ -23,7 +23,10 @@ function Node_Blur_Contrast(_x, _y, _group = noone) : Node_Processor(_x, _y, _gr
|
|||
inputs[| 5] = nodeValue("Active", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, true);
|
||||
active_index = 5;
|
||||
|
||||
input_display_list = [ 5,
|
||||
inputs[| 6] = nodeValue("Channel", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0b1111)
|
||||
.setDisplay(VALUE_DISPLAY.toggle, { data: array_create(4, THEME.inspector_channel) });
|
||||
|
||||
input_display_list = [ 5, 6,
|
||||
["Surfaces", true], 0, 3, 4,
|
||||
["Blur", false], 1, 2,
|
||||
]
|
||||
|
@ -70,6 +73,7 @@ function Node_Blur_Contrast(_x, _y, _group = noone) : Node_Processor(_x, _y, _gr
|
|||
surface_reset_target();
|
||||
|
||||
_outSurf = mask_apply(_data[0], _outSurf, _mask, _mix);
|
||||
_outSurf = channel_apply(_data[0], _outSurf, _data[6]);
|
||||
|
||||
return _outSurf;
|
||||
} #endregion
|
||||
|
|
|
@ -17,7 +17,10 @@ function Node_Blur_Directional(_x, _y, _group = noone) : Node_Processor(_x, _y,
|
|||
inputs[| 5] = nodeValue("Active", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, true);
|
||||
active_index = 5;
|
||||
|
||||
input_display_list = [ 5,
|
||||
inputs[| 6] = nodeValue("Channel", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0b1111)
|
||||
.setDisplay(VALUE_DISPLAY.toggle, { data: array_create(4, THEME.inspector_channel) });
|
||||
|
||||
input_display_list = [ 5, 6,
|
||||
["Surfaces", true], 0, 3, 4,
|
||||
["Blur", false], 1, 2,
|
||||
]
|
||||
|
@ -55,6 +58,7 @@ function Node_Blur_Directional(_x, _y, _group = noone) : Node_Processor(_x, _y,
|
|||
surface_reset_shader();
|
||||
|
||||
_outSurf = mask_apply(_data[0], _outSurf, _mask, _mix);
|
||||
_outSurf = channel_apply(_data[0], _outSurf, _data[6]);
|
||||
|
||||
return _outSurf;
|
||||
} #endregion
|
||||
|
|
|
@ -21,9 +21,12 @@ function Node_Blur_Radial(_x, _y, _group = noone) : Node_Processor(_x, _y, _grou
|
|||
inputs[| 6] = nodeValue("Active", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, true);
|
||||
active_index = 6;
|
||||
|
||||
inputs[| 7] = nodeValue("Channel", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0b1111)
|
||||
.setDisplay(VALUE_DISPLAY.toggle, { data: array_create(4, THEME.inspector_channel) });
|
||||
|
||||
outputs[| 0] = nodeValue("Surface out", self, JUNCTION_CONNECT.output, VALUE_TYPE.surface, noone);
|
||||
|
||||
input_display_list = [ 6,
|
||||
input_display_list = [ 6, 7,
|
||||
["Surfaces", true], 0, 4, 5,
|
||||
["Blur", false], 1, 2,
|
||||
];
|
||||
|
@ -61,6 +64,7 @@ function Node_Blur_Radial(_x, _y, _group = noone) : Node_Processor(_x, _y, _grou
|
|||
surface_reset_shader();
|
||||
|
||||
_outSurf = mask_apply(_data[0], _outSurf, _mask, _mix);
|
||||
_outSurf = channel_apply(_data[0], _outSurf, _data[7]);
|
||||
|
||||
return _outSurf;
|
||||
}
|
||||
|
|
|
@ -32,7 +32,10 @@ function Node_Blur_Simple(_x, _y, _group = noone) : Node_Processor(_x, _y, _grou
|
|||
inputs[| 8] = nodeValue("Active", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, true);
|
||||
active_index = 8;
|
||||
|
||||
input_display_list = [ 8,
|
||||
inputs[| 9] = nodeValue("Channel", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0b1111)
|
||||
.setDisplay(VALUE_DISPLAY.toggle, { data: array_create(4, THEME.inspector_channel) });
|
||||
|
||||
input_display_list = [ 8, 9,
|
||||
["Surfaces", true], 0, 6, 7,
|
||||
["Blur", false], 1, 3, 4, 5,
|
||||
];
|
||||
|
@ -77,6 +80,7 @@ function Node_Blur_Simple(_x, _y, _group = noone) : Node_Processor(_x, _y, _grou
|
|||
surface_reset_target();
|
||||
|
||||
_outSurf = mask_apply(_data[0], _outSurf, _msk, _mix);
|
||||
_outSurf = channel_apply(_data[0], _outSurf, _data[9]);
|
||||
|
||||
return _outSurf;
|
||||
} #endregion
|
||||
|
|
|
@ -25,9 +25,12 @@ function Node_Blur_Zoom(_x, _y, _group = noone) : Node_Processor(_x, _y, _group)
|
|||
inputs[| 8] = nodeValue("Active", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, true);
|
||||
active_index = 8;
|
||||
|
||||
inputs[| 9] = nodeValue("Channel", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0b1111)
|
||||
.setDisplay(VALUE_DISPLAY.toggle, { data: array_create(4, THEME.inspector_channel) });
|
||||
|
||||
outputs[| 0] = nodeValue("Surface out", self, JUNCTION_CONNECT.output, VALUE_TYPE.surface, noone);
|
||||
|
||||
input_display_list = [ 8,
|
||||
input_display_list = [ 8, 9,
|
||||
["Surfaces", true], 0, 6, 7,
|
||||
["Blur", false], 1, 2, 4, 5
|
||||
];
|
||||
|
@ -70,6 +73,7 @@ function Node_Blur_Zoom(_x, _y, _group = noone) : Node_Processor(_x, _y, _group)
|
|||
surface_reset_shader();
|
||||
|
||||
_outSurf = mask_apply(_data[0], _outSurf, _mask, _mix);
|
||||
_outSurf = channel_apply(_data[0], _outSurf, _data[9]);
|
||||
|
||||
return _outSurf;
|
||||
} #endregion
|
||||
|
|
|
@ -21,7 +21,10 @@ function Node_BW(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constr
|
|||
inputs[| 5] = nodeValue("Active", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, true);
|
||||
active_index = 5;
|
||||
|
||||
input_display_list = [ 5,
|
||||
inputs[| 6] = nodeValue("Channel", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0b1111)
|
||||
.setDisplay(VALUE_DISPLAY.toggle, { data: array_create(4, THEME.inspector_channel) });
|
||||
|
||||
input_display_list = [ 5, 6,
|
||||
["Surfaces", true], 0, 3, 4,
|
||||
["BW", false], 1, 2,
|
||||
]
|
||||
|
@ -47,6 +50,7 @@ function Node_BW(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constr
|
|||
surface_reset_target();
|
||||
|
||||
_outSurf = mask_apply(_data[0], _outSurf, _data[3], _data[4]);
|
||||
_outSurf = channel_apply(_data[0], _outSurf, _data[6]);
|
||||
|
||||
return _outSurf;
|
||||
} #endregion
|
||||
|
|
|
@ -47,7 +47,7 @@ function __Node_Cache(_x, _y, _group = noone) : Node(_x, _y, _group) constructor
|
|||
static disableNodeGroup = function() { #region
|
||||
if(LOADING || APPENDING) return;
|
||||
|
||||
if(IS_PLAYING && CURRENT_FRAME == TOTAL_FRAMES - 1)
|
||||
if(IS_PLAYING && LAST_FRAME)
|
||||
for( var i = 0, n = array_length(cache_group_members); i < n; i++ )
|
||||
cache_group_members[i].renderActive = false;
|
||||
} #endregion
|
||||
|
|
|
@ -37,7 +37,10 @@ function Node_Color_replace(_x, _y, _group = noone) : Node_Processor(_x, _y, _gr
|
|||
inputs[| 9] = nodeValue("Active", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, true);
|
||||
active_index = 9;
|
||||
|
||||
input_display_list = [ 9,
|
||||
inputs[| 10] = nodeValue("Channel", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0b1111)
|
||||
.setDisplay(VALUE_DISPLAY.toggle, { data: array_create(4, THEME.inspector_channel) });
|
||||
|
||||
input_display_list = [ 9, 10,
|
||||
["Surfaces", true], 0, 7, 8,
|
||||
["Palette", false], 1, 2,
|
||||
["Comparison", false], 3, 5,
|
||||
|
@ -98,6 +101,7 @@ function Node_Color_replace(_x, _y, _group = noone) : Node_Processor(_x, _y, _gr
|
|||
surface_reset_target();
|
||||
|
||||
if(!in) _outSurf = mask_apply(_data[0], _outSurf, _data[7], _data[8]);
|
||||
_outSurf = channel_apply(_data[0], _outSurf, _data[10]);
|
||||
|
||||
return _outSurf;
|
||||
} #endregion
|
||||
|
|
|
@ -26,7 +26,10 @@ function Node_Color_Remove(_x, _y, _group = noone) : Node_Processor(_x, _y, _gro
|
|||
|
||||
inputs[| 6] = nodeValue("Invert", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, false, "Keep the selected colors and remove the rest.");
|
||||
|
||||
input_display_list = [ 5,
|
||||
inputs[| 7] = nodeValue("Channel", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0b1111)
|
||||
.setDisplay(VALUE_DISPLAY.toggle, { data: array_create(4, THEME.inspector_channel) });
|
||||
|
||||
input_display_list = [ 5, 7,
|
||||
["Surfaces", true], 0, 3, 4,
|
||||
["Remove", false], 1, 2, 6,
|
||||
]
|
||||
|
@ -61,6 +64,7 @@ function Node_Color_Remove(_x, _y, _group = noone) : Node_Processor(_x, _y, _gro
|
|||
surface_reset_target();
|
||||
|
||||
_outSurf = mask_apply(_data[0], _outSurf, _data[3], _data[4]);
|
||||
_outSurf = channel_apply(_data[0], _outSurf, _data[7]);
|
||||
|
||||
return _outSurf;
|
||||
} #endregion
|
||||
|
|
|
@ -26,7 +26,10 @@ function Node_Colorize(_x, _y, _group = noone) : Node_Processor(_x, _y, _group)
|
|||
|
||||
inputs[| 6] = nodeValue("Multiply alpha", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, true);
|
||||
|
||||
input_display_list = [ 5,
|
||||
inputs[| 7] = nodeValue("Channel", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0b1111)
|
||||
.setDisplay(VALUE_DISPLAY.toggle, { data: array_create(4, THEME.inspector_channel) });
|
||||
|
||||
input_display_list = [ 5, 7,
|
||||
["Surfaces", true], 0, 3, 4,
|
||||
["Colorize", false], 1, 2, 6,
|
||||
]
|
||||
|
@ -63,6 +66,7 @@ function Node_Colorize(_x, _y, _group = noone) : Node_Processor(_x, _y, _group)
|
|||
surface_reset_target();
|
||||
|
||||
_outSurf = mask_apply(_data[0], _outSurf, _data[3], _data[4]);
|
||||
_outSurf = channel_apply(_data[0], _outSurf, _data[7]);
|
||||
|
||||
return _outSurf;
|
||||
} #endregion
|
||||
|
|
|
@ -22,9 +22,12 @@ function Node_Convolution(_x, _y, _group = noone) : Node_Processor(_x, _y, _grou
|
|||
inputs[| 5] = nodeValue("Active", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, true);
|
||||
active_index = 5;
|
||||
|
||||
inputs[| 6] = nodeValue("Channel", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0b1111)
|
||||
.setDisplay(VALUE_DISPLAY.toggle, { data: array_create(4, THEME.inspector_channel) });
|
||||
|
||||
outputs[| 0] = nodeValue("Surface out", self, JUNCTION_CONNECT.output, VALUE_TYPE.surface, noone);
|
||||
|
||||
input_display_list = [ 5,
|
||||
input_display_list = [ 5, 6,
|
||||
["Surfaces", true], 0, 3, 4,
|
||||
["Kernel", false], 1,
|
||||
];
|
||||
|
@ -51,6 +54,7 @@ function Node_Convolution(_x, _y, _group = noone) : Node_Processor(_x, _y, _grou
|
|||
surface_reset_target();
|
||||
|
||||
_outSurf = mask_apply(_data[0], _outSurf, _data[3], _data[4]);
|
||||
_outSurf = channel_apply(_data[0], _outSurf, _data[6]);
|
||||
|
||||
return _outSurf;
|
||||
}
|
||||
|
|
|
@ -20,7 +20,10 @@ function Node_Corner(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) co
|
|||
inputs[| 4] = nodeValue("Active", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, true);
|
||||
active_index = 4;
|
||||
|
||||
input_display_list = [ 4,
|
||||
inputs[| 5] = nodeValue("Channel", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0b1111)
|
||||
.setDisplay(VALUE_DISPLAY.toggle, { data: array_create(4, THEME.inspector_channel) });
|
||||
|
||||
input_display_list = [ 4, 5,
|
||||
["Surfaces", true], 0, 2, 3,
|
||||
["Corner", false], 1,
|
||||
]
|
||||
|
@ -63,6 +66,7 @@ function Node_Corner(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) co
|
|||
surface_free(temp);
|
||||
|
||||
_outSurf = mask_apply(_data[0], _outSurf, _data[2], _data[3]);
|
||||
_outSurf = channel_apply(_data[0], _outSurf, _data[5]);
|
||||
|
||||
return _outSurf;
|
||||
}
|
||||
|
|
|
@ -32,9 +32,12 @@ function Node_Curve(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) con
|
|||
inputs[| 7] = nodeValue("Active", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, true);
|
||||
active_index = 7;
|
||||
|
||||
inputs[| 8] = nodeValue("Channel", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0b1111)
|
||||
.setDisplay(VALUE_DISPLAY.toggle, { data: array_create(4, THEME.inspector_channel) });
|
||||
|
||||
outputs[| 0] = nodeValue("Surface out", self, JUNCTION_CONNECT.output, VALUE_TYPE.surface, noone);
|
||||
|
||||
input_display_list = [ 7,
|
||||
input_display_list = [ 7, 8,
|
||||
["Surfaces", true], 0, 5, 6,
|
||||
["Curve", false], 1, 2, 3, 4,
|
||||
];
|
||||
|
@ -68,6 +71,7 @@ function Node_Curve(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) con
|
|||
surface_reset_target();
|
||||
|
||||
_outSurf = mask_apply(_data[0], _outSurf, _data[5], _data[6]);
|
||||
_outSurf = channel_apply(_data[0], _outSurf, _data[8]);
|
||||
|
||||
return _outSurf;
|
||||
} #endregion
|
||||
|
|
|
@ -592,11 +592,13 @@ function Node(_x, _y, _group = PANEL_GRAPH.getCurrentContext()) : __Node_Base(_x
|
|||
|
||||
onValueUpdate(index);
|
||||
if(cache_group) cache_group.enableNodeGroup();
|
||||
if(is_dynamic_input) setHeight();
|
||||
} #endregion
|
||||
|
||||
static valueFromUpdate = function(index) { #region
|
||||
onValueFromUpdate(index);
|
||||
if(cache_group) cache_group.enableNodeGroup();
|
||||
if(is_dynamic_input) setHeight();
|
||||
} #endregion
|
||||
|
||||
static onValueUpdate = function(index = 0) {}
|
||||
|
|
|
@ -30,9 +30,12 @@ function Node_Dilate(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) co
|
|||
inputs[| 7] = nodeValue("Active", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, true);
|
||||
active_index = 7;
|
||||
|
||||
inputs[| 8] = nodeValue("Channel", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0b1111)
|
||||
.setDisplay(VALUE_DISPLAY.toggle, { data: array_create(4, THEME.inspector_channel) });
|
||||
|
||||
outputs[| 0] = nodeValue("Surface out", self, JUNCTION_CONNECT.output, VALUE_TYPE.surface, noone);
|
||||
|
||||
input_display_list = [ 7,
|
||||
input_display_list = [ 7, 8,
|
||||
["Surfaces", true], 0, 5, 6,
|
||||
["Dilate", false], 1, 2, 3,
|
||||
];
|
||||
|
@ -68,6 +71,7 @@ function Node_Dilate(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) co
|
|||
surface_reset_shader();
|
||||
|
||||
_outSurf = mask_apply(_data[0], _outSurf, _data[5], _data[6]);
|
||||
_outSurf = channel_apply(_data[0], _outSurf, _data[8]);
|
||||
|
||||
return _outSurf;
|
||||
} #endregion
|
||||
|
|
|
@ -37,7 +37,10 @@ If set, then strength value control how many times the effect applies on itself.
|
|||
inputs[| 11] = nodeValue("Blend mode", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0)
|
||||
.setDisplay(VALUE_DISPLAY.enum_scroll, [ "Overwrite", "Min", "Max" ]);
|
||||
|
||||
input_display_list = [ 10,
|
||||
inputs[| 12] = nodeValue("Channel", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0b1111)
|
||||
.setDisplay(VALUE_DISPLAY.toggle, { data: array_create(4, THEME.inspector_channel) });
|
||||
|
||||
input_display_list = [ 10, 12,
|
||||
["Surfaces", true], 0, 8, 9,
|
||||
["Displace", false], 1, 3, 4,
|
||||
["Color", false], 5, 2,
|
||||
|
@ -81,6 +84,7 @@ If set, then strength value control how many times the effect applies on itself.
|
|||
surface_reset_shader();
|
||||
|
||||
_outSurf = mask_apply(_data[0], _outSurf, _data[8], _data[9]);
|
||||
_outSurf = channel_apply(_data[0], _outSurf, _data[12]);
|
||||
|
||||
return _outSurf;
|
||||
} #endregion
|
||||
|
|
|
@ -42,9 +42,12 @@ function Node_Dither(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) co
|
|||
inputs[| 9] = nodeValue("Active", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, true);
|
||||
active_index = 9;
|
||||
|
||||
inputs[| 10] = nodeValue("Channel", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0b1111)
|
||||
.setDisplay(VALUE_DISPLAY.toggle, { data: array_create(4, THEME.inspector_channel) });
|
||||
|
||||
outputs[| 0] = nodeValue("Surface out", self, JUNCTION_CONNECT.output, VALUE_TYPE.surface, noone);
|
||||
|
||||
input_display_list = [ 9,
|
||||
input_display_list = [ 9, 10,
|
||||
["Surfaces", true], 0, 7, 8,
|
||||
["Pattern", false], 2, 3,
|
||||
["Dither", false], 6, 1, 4, 5
|
||||
|
@ -140,6 +143,7 @@ function Node_Dither(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) co
|
|||
surface_reset_target();
|
||||
|
||||
_outSurf = mask_apply(_data[0], _outSurf, _data[7], _data[8]);
|
||||
_outSurf = channel_apply(_data[0], _outSurf, _data[10]);
|
||||
|
||||
return _outSurf;
|
||||
}
|
||||
|
|
|
@ -22,9 +22,12 @@ function Node_Edge_Detect(_x, _y, _group = noone) : Node_Processor(_x, _y, _grou
|
|||
inputs[| 5] = nodeValue("Active", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, true);
|
||||
active_index = 5;
|
||||
|
||||
inputs[| 6] = nodeValue("Channel", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0b1111)
|
||||
.setDisplay(VALUE_DISPLAY.toggle, { data: array_create(4, THEME.inspector_channel) });
|
||||
|
||||
outputs[| 0] = nodeValue("Surface out", self, JUNCTION_CONNECT.output, VALUE_TYPE.surface, noone);
|
||||
|
||||
input_display_list = [ 5,
|
||||
input_display_list = [ 5, 6,
|
||||
["Surfaces", true], 0, 3, 4,
|
||||
["Edge detect", false], 1,
|
||||
];
|
||||
|
@ -51,6 +54,7 @@ function Node_Edge_Detect(_x, _y, _group = noone) : Node_Processor(_x, _y, _grou
|
|||
surface_reset_target();
|
||||
|
||||
_outSurf = mask_apply(_data[0], _outSurf, _data[3], _data[4]);
|
||||
_outSurf = channel_apply(_data[0], _outSurf, _data[6]);
|
||||
|
||||
return _outSurf;
|
||||
}
|
||||
|
|
|
@ -23,7 +23,10 @@ function Node_Erode(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) con
|
|||
inputs[| 6] = nodeValue("Active", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, true);
|
||||
active_index = 6;
|
||||
|
||||
input_display_list = [ 6,
|
||||
inputs[| 7] = nodeValue("Channel", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0b1111)
|
||||
.setDisplay(VALUE_DISPLAY.toggle, { data: array_create(4, THEME.inspector_channel) });
|
||||
|
||||
input_display_list = [ 6, 7,
|
||||
["Surfaces", true], 0, 4, 5,
|
||||
["Erode", false], 1, 2, 3,
|
||||
]
|
||||
|
@ -51,6 +54,7 @@ function Node_Erode(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) con
|
|||
surface_reset_target();
|
||||
|
||||
_outSurf = mask_apply(_data[0], _outSurf, _data[4], _data[5]);
|
||||
_outSurf = channel_apply(_data[0], _outSurf, _data[7]);
|
||||
|
||||
return _outSurf;
|
||||
}
|
||||
|
|
|
@ -769,7 +769,7 @@ function Node_Export(_x, _y, _group = noone) : Node(_x, _y, _group) constructor
|
|||
|
||||
export();
|
||||
|
||||
if(CURRENT_FRAME == TOTAL_FRAMES - 1) {
|
||||
if(LAST_FRAME) {
|
||||
if(anim == NODE_EXPORT_FORMAT.sequence)
|
||||
array_remove(RENDERING, node_id);
|
||||
else if(anim == NODE_EXPORT_FORMAT.animation)
|
||||
|
|
|
@ -13,7 +13,7 @@ function Node_Feedback_Output(_x, _y, _group = noone) : Node_Group_Output(_x, _y
|
|||
|
||||
static update = function(frame = CURRENT_FRAME) {
|
||||
if(inputs[| 0].isLeaf()) return;
|
||||
if(CURRENT_FRAME == TOTAL_FRAMES - 1) {
|
||||
if(LAST_FRAME) {
|
||||
cache_value = noone;
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -21,7 +21,10 @@ function Node_Greyscale(_x, _y, _group = noone) : Node_Processor(_x, _y, _group)
|
|||
inputs[| 5] = nodeValue("Active", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, true);
|
||||
active_index = 5;
|
||||
|
||||
input_display_list = [ 5,
|
||||
inputs[| 6] = nodeValue("Channel", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0b1111)
|
||||
.setDisplay(VALUE_DISPLAY.toggle, { data: array_create(4, THEME.inspector_channel) });
|
||||
|
||||
input_display_list = [ 5, 6,
|
||||
["Surfaces", true], 0, 3, 4,
|
||||
["Greyscale", false], 1, 2,
|
||||
]
|
||||
|
@ -47,6 +50,7 @@ function Node_Greyscale(_x, _y, _group = noone) : Node_Processor(_x, _y, _group)
|
|||
surface_reset_target();
|
||||
|
||||
_outSurf = mask_apply(_data[0], _outSurf, _data[3], _data[4]);
|
||||
_outSurf = channel_apply(_data[0], _outSurf, _data[6]);
|
||||
|
||||
return _outSurf;
|
||||
} #endregion
|
||||
|
|
|
@ -11,7 +11,10 @@ function Node_Invert(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) co
|
|||
inputs[| 3] = nodeValue("Active", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, true);
|
||||
active_index = 3;
|
||||
|
||||
input_display_list = [ 3,
|
||||
inputs[| 4] = nodeValue("Channel", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0b1111)
|
||||
.setDisplay(VALUE_DISPLAY.toggle, { data: array_create(4, THEME.inspector_channel) });
|
||||
|
||||
input_display_list = [ 3, 4,
|
||||
["Surfaces", true], 0, 1, 2,
|
||||
]
|
||||
|
||||
|
@ -32,6 +35,7 @@ function Node_Invert(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) co
|
|||
surface_reset_target();
|
||||
|
||||
_outSurf = mask_apply(_data[0], _outSurf, _data[1], _data[2]);
|
||||
_outSurf = channel_apply(_data[0], _outSurf, _data[4]);
|
||||
|
||||
return _outSurf;
|
||||
} #endregion
|
||||
|
|
|
@ -38,6 +38,9 @@ function Node_Level(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) con
|
|||
inputs[| 8] = nodeValue("Active", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, true);
|
||||
active_index = 8;
|
||||
|
||||
inputs[| 9] = nodeValue("Channel", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0b1111)
|
||||
.setDisplay(VALUE_DISPLAY.toggle, { data: array_create(4, THEME.inspector_channel) });
|
||||
|
||||
outputs[| 0] = nodeValue("Surface out", self, JUNCTION_CONNECT.output, VALUE_TYPE.surface, noone);
|
||||
|
||||
attribute_surface_depth();
|
||||
|
@ -75,7 +78,7 @@ function Node_Level(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) con
|
|||
return _h;
|
||||
}); #endregion
|
||||
|
||||
input_display_list = [ 8,
|
||||
input_display_list = [ 8, 9,
|
||||
level_renderer,
|
||||
["Surfaces", true], 0, 6, 7,
|
||||
["Level", false], 1,
|
||||
|
@ -131,6 +134,7 @@ function Node_Level(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) con
|
|||
surface_reset_target();
|
||||
|
||||
_outSurf = mask_apply(_data[0], _outSurf, _data[6], _data[7]);
|
||||
_outSurf = channel_apply(_data[0], _outSurf, _data[9]);
|
||||
|
||||
return _outSurf;
|
||||
} #endregion
|
||||
|
|
|
@ -21,6 +21,9 @@ function Node_Level_Selector(_x, _y, _group = noone) : Node_Processor(_x, _y, _g
|
|||
inputs[| 5] = nodeValue("Active", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, true);
|
||||
active_index = 5;
|
||||
|
||||
inputs[| 6] = nodeValue("Channel", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0b1111)
|
||||
.setDisplay(VALUE_DISPLAY.toggle, { data: array_create(4, THEME.inspector_channel) });
|
||||
|
||||
outputs[| 0] = nodeValue("Surface out", self, JUNCTION_CONNECT.output, VALUE_TYPE.surface, noone);
|
||||
|
||||
attribute_surface_depth();
|
||||
|
@ -60,7 +63,7 @@ function Node_Level_Selector(_x, _y, _group = noone) : Node_Processor(_x, _y, _g
|
|||
return _h;
|
||||
}); #endregion
|
||||
|
||||
input_display_list = [ 5,
|
||||
input_display_list = [ 5, 6,
|
||||
level_renderer,
|
||||
["Surfaces", true], 0, 3, 4,
|
||||
["Level", false], 1, 2,
|
||||
|
@ -99,6 +102,7 @@ function Node_Level_Selector(_x, _y, _group = noone) : Node_Processor(_x, _y, _g
|
|||
surface_reset_target();
|
||||
|
||||
_outSurf = mask_apply(_data[0], _outSurf, _data[3], _data[4]);
|
||||
_outSurf = channel_apply(_data[0], _outSurf, _data[6]);
|
||||
|
||||
return _outSurf;
|
||||
} #endregion
|
||||
|
|
|
@ -30,9 +30,12 @@ function Node_Local_Analyze(_x, _y, _group = noone) : Node_Processor(_x, _y, _gr
|
|||
inputs[| 7] = nodeValue("Active", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, true);
|
||||
active_index = 7;
|
||||
|
||||
inputs[| 8] = nodeValue("Channel", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0b1111)
|
||||
.setDisplay(VALUE_DISPLAY.toggle, { data: array_create(4, THEME.inspector_channel) });
|
||||
|
||||
outputs[| 0] = nodeValue("Surface out", self, JUNCTION_CONNECT.output, VALUE_TYPE.surface, noone);
|
||||
|
||||
input_display_list = [ 7,
|
||||
input_display_list = [ 7, 8,
|
||||
["Surfaces", true], 0, 5, 6,
|
||||
["Effect", false], 1, 2, 4,
|
||||
];
|
||||
|
@ -63,6 +66,7 @@ function Node_Local_Analyze(_x, _y, _group = noone) : Node_Processor(_x, _y, _gr
|
|||
surface_reset_target();
|
||||
|
||||
_outSurf = mask_apply(_data[0], _outSurf, _data[5], _data[6]);
|
||||
_outSurf = channel_apply(_data[0], _outSurf, _data[8]);
|
||||
|
||||
return _outSurf;
|
||||
}
|
||||
|
|
|
@ -17,7 +17,10 @@ function Node_Palette_Shift(_x, _y, _group = noone) : Node_Processor(_x, _y, _gr
|
|||
inputs[| 5] = nodeValue("Active", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, true);
|
||||
active_index = 5;
|
||||
|
||||
input_display_list = [ 5,
|
||||
inputs[| 6] = nodeValue("Channel", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0b1111)
|
||||
.setDisplay(VALUE_DISPLAY.toggle, { data: array_create(4, THEME.inspector_channel) });
|
||||
|
||||
input_display_list = [ 5, 6,
|
||||
["Surfaces", true], 0, 3, 4,
|
||||
["Palette", false], 1, 2
|
||||
]
|
||||
|
@ -46,6 +49,7 @@ function Node_Palette_Shift(_x, _y, _group = noone) : Node_Processor(_x, _y, _gr
|
|||
surface_reset_shader();
|
||||
|
||||
_outSurf = mask_apply(_data[0], _outSurf, _data[3], _data[4]);
|
||||
_outSurf = channel_apply(_data[0], _outSurf, _data[6]);
|
||||
|
||||
return _outSurf;
|
||||
} #endregion
|
||||
|
|
|
@ -25,7 +25,10 @@ function Node_Pixel_Sort(_x, _y, _group = noone) : Node_Processor(_x, _y, _group
|
|||
inputs[| 6] = nodeValue("Active", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, true);
|
||||
active_index = 6;
|
||||
|
||||
input_display_list = [ 6,
|
||||
inputs[| 7] = nodeValue("Channel", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0b1111)
|
||||
.setDisplay(VALUE_DISPLAY.toggle, { data: array_create(4, THEME.inspector_channel) });
|
||||
|
||||
input_display_list = [ 6, 7,
|
||||
["Surfaces", true], 0, 4, 5,
|
||||
["Pixel sort", false], 1, 2, 3,
|
||||
]
|
||||
|
@ -87,6 +90,7 @@ function Node_Pixel_Sort(_x, _y, _group = noone) : Node_Processor(_x, _y, _group
|
|||
surface_free(pp[1]);
|
||||
|
||||
_outSurf = mask_apply(_data[0], _outSurf, _data[4], _data[5]);
|
||||
_outSurf = channel_apply(_data[0], _outSurf, _data[7]);
|
||||
|
||||
return _outSurf;
|
||||
} #endregion
|
||||
|
|
|
@ -11,9 +11,12 @@ function Node_Polar(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) con
|
|||
inputs[| 3] = nodeValue("Active", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, true);
|
||||
active_index = 3;
|
||||
|
||||
inputs[| 4] = nodeValue("Channel", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0b1111)
|
||||
.setDisplay(VALUE_DISPLAY.toggle, { data: array_create(4, THEME.inspector_channel) });
|
||||
|
||||
outputs[| 0] = nodeValue("Surface out", self, JUNCTION_CONNECT.output, VALUE_TYPE.surface, noone);
|
||||
|
||||
input_display_list = [ 3,
|
||||
input_display_list = [ 3, 4,
|
||||
["Surfaces", false], 0, 1, 2,
|
||||
]
|
||||
|
||||
|
@ -27,6 +30,7 @@ function Node_Polar(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) con
|
|||
surface_reset_shader();
|
||||
|
||||
_outSurf = mask_apply(_data[0], _outSurf, _data[1], _data[2]);
|
||||
_outSurf = channel_apply(_data[0], _outSurf, _data[4]);
|
||||
|
||||
return _outSurf;
|
||||
}
|
||||
|
|
|
@ -87,7 +87,9 @@ function Node_Render_Sprite_Sheet(_x, _y, _group = noone) : Node(_x, _y, _group)
|
|||
if(grup != SPRITE_ANIM_GROUP.animation) {
|
||||
initRender();
|
||||
return;
|
||||
} else if(IS_RENDERING && PROJECT.animator.frame_progress && CURRENT_FRAME == 0 && !refreshSurface) {
|
||||
}
|
||||
|
||||
if(IS_RENDERING && PROJECT.animator.frame_progress && CURRENT_FRAME == 0 && !refreshSurface) {
|
||||
var skip = getInputData(2);
|
||||
|
||||
var arr = is_array(inpt);
|
||||
|
@ -247,6 +249,9 @@ function Node_Render_Sprite_Sheet(_x, _y, _group = noone) : Node(_x, _y, _group)
|
|||
|
||||
if(drawn) array_safe_set(anim_drawn, CURRENT_FRAME, true);
|
||||
outputs[| 1].setValue(_atl);
|
||||
|
||||
if(LAST_FRAME)
|
||||
array_remove(RENDERING, node_id);
|
||||
} #endregion
|
||||
|
||||
static onInspector1Update = function(updateAll = true) { #region
|
||||
|
@ -261,6 +266,8 @@ function Node_Render_Sprite_Sheet(_x, _y, _group = noone) : Node(_x, _y, _group)
|
|||
|
||||
node.initRender();
|
||||
}
|
||||
|
||||
array_push(RENDERING, node_id);
|
||||
} #endregion
|
||||
|
||||
static initRender = function() { #region
|
||||
|
|
|
@ -26,7 +26,10 @@ function Node_Skew(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) cons
|
|||
inputs[| 8] = nodeValue("Active", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, true);
|
||||
active_index = 8;
|
||||
|
||||
input_display_list = [ 8,
|
||||
inputs[| 9] = nodeValue("Channel", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0b1111)
|
||||
.setDisplay(VALUE_DISPLAY.toggle, { data: array_create(4, THEME.inspector_channel) });
|
||||
|
||||
input_display_list = [ 8, 9,
|
||||
["Surfaces", true], 0, 6, 7,
|
||||
["Skew", false], 1, 2, 4,
|
||||
]
|
||||
|
@ -67,6 +70,7 @@ function Node_Skew(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) cons
|
|||
surface_reset_shader();
|
||||
|
||||
_outSurf = mask_apply(_data[0], _outSurf, _data[6], _data[7]);
|
||||
_outSurf = channel_apply(_data[0], _outSurf, _data[9]);
|
||||
|
||||
return _outSurf;
|
||||
}
|
||||
|
|
|
@ -5,10 +5,10 @@ function Node_Threshold(_x, _y, _group = noone) : Node_Processor(_x, _y, _group)
|
|||
|
||||
inputs[| 1] = nodeValue("Brightness", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, false);
|
||||
|
||||
inputs[| 2] = nodeValue("Brightness Threshold", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0.5)
|
||||
inputs[| 2] = nodeValue("Brightness Threshold", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0.5)
|
||||
.setDisplay(VALUE_DISPLAY.slider);
|
||||
|
||||
inputs[| 3] = nodeValue("Brightness Smoothness", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0)
|
||||
inputs[| 3] = nodeValue("Brightness Smoothness", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0)
|
||||
.setDisplay(VALUE_DISPLAY.slider);
|
||||
|
||||
inputs[| 4] = nodeValue("Mask", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, 0);
|
||||
|
@ -21,15 +21,18 @@ function Node_Threshold(_x, _y, _group = noone) : Node_Processor(_x, _y, _group)
|
|||
|
||||
inputs[| 7] = nodeValue("Alpha", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, false);
|
||||
|
||||
inputs[| 8] = nodeValue("Alpha Threshold", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0.5)
|
||||
inputs[| 8] = nodeValue("Alpha Threshold", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0.5)
|
||||
.setDisplay(VALUE_DISPLAY.slider);
|
||||
|
||||
inputs[| 9] = nodeValue("Alpha Smoothness", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0)
|
||||
inputs[| 9] = nodeValue("Alpha Smoothness", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0)
|
||||
.setDisplay(VALUE_DISPLAY.slider);
|
||||
|
||||
inputs[| 10] = nodeValue("Channel", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0b1111)
|
||||
.setDisplay(VALUE_DISPLAY.toggle, { data: array_create(4, THEME.inspector_channel) });
|
||||
|
||||
outputs[| 0] = nodeValue("Surface out", self, JUNCTION_CONNECT.output, VALUE_TYPE.surface, noone);
|
||||
|
||||
input_display_list = [ 6,
|
||||
input_display_list = [ 6, 10,
|
||||
["Surfaces", true], 0, 4, 5,
|
||||
["Threshold", false], 1, 2, 3, 7, 8, 9,
|
||||
];
|
||||
|
@ -56,9 +59,9 @@ function Node_Threshold(_x, _y, _group = noone) : Node_Processor(_x, _y, _group)
|
|||
var _alphaSmooth = _data[9];
|
||||
|
||||
surface_set_shader(_outSurf, sh_threshold);
|
||||
shader_set_i("bright", _bright );
|
||||
shader_set_f("brightThreshold", _brightThreshold );
|
||||
shader_set_f("brightSmooth", _brightSmooth );
|
||||
shader_set_i("bright", _bright );
|
||||
shader_set_f("brightThreshold", _brightThreshold);
|
||||
shader_set_f("brightSmooth", _brightSmooth );
|
||||
|
||||
shader_set_i("alpha", _alpha );
|
||||
shader_set_f("alphaThreshold", _alphaThreshold );
|
||||
|
@ -68,6 +71,7 @@ function Node_Threshold(_x, _y, _group = noone) : Node_Processor(_x, _y, _group)
|
|||
surface_reset_shader();
|
||||
|
||||
_outSurf = mask_apply(_data[0], _outSurf, _data[4], _data[5]);
|
||||
_outSurf = channel_apply(_data[0], _outSurf, _data[10]);
|
||||
|
||||
return _outSurf;
|
||||
} #endregion
|
||||
|
|
|
@ -30,9 +30,12 @@ function Node_Twirl(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) con
|
|||
inputs[| 7] = nodeValue("Active", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, true);
|
||||
active_index = 7;
|
||||
|
||||
inputs[| 8] = nodeValue("Channel", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0b1111)
|
||||
.setDisplay(VALUE_DISPLAY.toggle, { data: array_create(4, THEME.inspector_channel) });
|
||||
|
||||
outputs[| 0] = nodeValue("Surface out", self, JUNCTION_CONNECT.output, VALUE_TYPE.surface, noone);
|
||||
|
||||
input_display_list = [ 7,
|
||||
input_display_list = [ 7, 8,
|
||||
["Surfaces", true], 0, 5, 6,
|
||||
["Twirl", false], 1, 2, 3,
|
||||
];
|
||||
|
@ -67,6 +70,7 @@ function Node_Twirl(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) con
|
|||
surface_reset_shader();
|
||||
|
||||
_outSurf = mask_apply(_data[0], _outSurf, _data[5], _data[6]);
|
||||
_outSurf = channel_apply(_data[0], _outSurf, _data[8]);
|
||||
|
||||
return _outSurf;
|
||||
} #endregion
|
||||
|
|
|
@ -2264,7 +2264,7 @@ function NodeValue(_name, _node, _connect, _type, _value, _tooltip = "") constru
|
|||
break;
|
||||
}
|
||||
} #endregion
|
||||
|
||||
|
||||
static isVisible = function() { #region
|
||||
if(!node.active) return false;
|
||||
|
||||
|
|
|
@ -45,7 +45,7 @@ function Node_Widget_Test(_x, _y, _group = noone) : Node(_x, _y, _group) constru
|
|||
inputs[| 32] = nodeValue("textArrayBox", self, JUNCTION_CONNECT.input, VALUE_TYPE.text, []) .setDisplay(VALUE_DISPLAY.text_array, { data: [ "Choice 1", "Choice 2" ] })
|
||||
|
||||
inputs[| 33] = nodeValue("surfaceBox", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone) .setDisplay(VALUE_DISPLAY._default)
|
||||
|
||||
|
||||
input_display_list = [
|
||||
["Number", false], 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18,
|
||||
["Boolean", false], 19,
|
||||
|
|
|
@ -156,8 +156,8 @@
|
|||
map.key = save_l;
|
||||
|
||||
PREFERENCES.window_maximize = gameframe_is_maximized();
|
||||
PREFERENCES.window_width = WIN_W;
|
||||
PREFERENCES.window_height = WIN_H;
|
||||
PREFERENCES.window_width = max(960, WIN_W);
|
||||
PREFERENCES.window_height = max(600, WIN_H);
|
||||
|
||||
map.preferences = PREFERENCES;
|
||||
|
||||
|
|
|
@ -33,7 +33,7 @@ function toggleGroup(_data, _onClick) : widget() constructor {
|
|||
h = _h;
|
||||
value = _data;
|
||||
|
||||
if(!is_array(_data)) return 0;
|
||||
if(is_array(_data)) return 0;
|
||||
|
||||
var amo = array_length(data);
|
||||
var ww = _w / amo;
|
||||
|
|
Loading…
Reference in a new issue