2023-07-18 17:51:40 +02:00
|
|
|
function Node_Blinker(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor {
|
|
|
|
name = "Blinker";
|
|
|
|
|
|
|
|
inputs[| 0] = nodeValue("Surface in", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, 0);
|
|
|
|
|
|
|
|
inputs[| 1] = nodeValue("Mask", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, 0);
|
|
|
|
|
|
|
|
inputs[| 2] = nodeValue("Seed", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, irandom_range( 100000, 999999 ))
|
|
|
|
|
|
|
|
inputs[| 3] = nodeValue("Amount", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0.5)
|
2023-10-02 08:57:44 +02:00
|
|
|
.setDisplay(VALUE_DISPLAY.slider);
|
2023-07-18 17:51:40 +02:00
|
|
|
|
2023-07-21 12:40:20 +02:00
|
|
|
inputs[| 4] = nodeValue("Target Colors", self, JUNCTION_CONNECT.input, VALUE_TYPE.color, DEF_PALETTE )
|
2023-07-18 17:51:40 +02:00
|
|
|
.setDisplay(VALUE_DISPLAY.palette);
|
|
|
|
|
2023-07-21 12:40:20 +02:00
|
|
|
inputs[| 5] = nodeValue("Light Colors", self, JUNCTION_CONNECT.input, VALUE_TYPE.color, DEF_PALETTE )
|
2023-07-18 17:51:40 +02:00
|
|
|
.setDisplay(VALUE_DISPLAY.palette);
|
|
|
|
|
|
|
|
inputs[| 6] = nodeValue("Active", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, true);
|
|
|
|
active_index = 6;
|
|
|
|
|
|
|
|
outputs[| 0] = nodeValue("Surface out", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, 0);
|
|
|
|
|
|
|
|
input_display_list = [ 6,
|
2023-11-08 14:37:51 +01:00
|
|
|
["Surfaces", false], 0, 1,
|
|
|
|
["Blink", false], 2, 3, 4, 5,
|
2023-07-18 17:51:40 +02:00
|
|
|
]
|
|
|
|
|
|
|
|
temp_surface = [ surface_create( 1, 1 ) ];
|
|
|
|
|
2023-08-17 16:56:54 +02:00
|
|
|
static processData = function(_outSurf, _data, _output_index, _array_index) {
|
2023-07-18 17:51:40 +02:00
|
|
|
//var _surf = _data[0];
|
|
|
|
//var _mask = _data[1];
|
|
|
|
//var _seed = _data[2];
|
|
|
|
//var _amou = _data[3];
|
|
|
|
//var _trgC = _data[4];
|
|
|
|
//var _ligC = _data[5];
|
|
|
|
|
|
|
|
//if(!is_surface(_surf)) return _outSurf;
|
|
|
|
|
2023-09-08 21:37:36 +02:00
|
|
|
//temp_surface[0] = surface_verify(temp_surface[0], surface_get_width_safe(_outSurf), surface_get_height_safe(_outSurf));
|
2023-07-18 17:51:40 +02:00
|
|
|
|
|
|
|
//surface_set_shader(temp_surface[0], sh_blink_extract);
|
2023-09-08 21:09:09 +02:00
|
|
|
// draw_surface_safe(_surf);
|
2023-07-18 17:51:40 +02:00
|
|
|
//surface_reset_shader();
|
|
|
|
|
|
|
|
//surface_set_shader(_outSurf, sh_blink_replace);
|
2023-09-08 21:09:09 +02:00
|
|
|
// draw_surface_safe(temp_surface[0]);
|
2023-07-18 17:51:40 +02:00
|
|
|
//surface_reset_shader();
|
|
|
|
|
|
|
|
//return _outSurf;
|
|
|
|
}
|
|
|
|
}
|