Pixel-Composer/scripts/node_rm_primitive/node_rm_primitive.gml

27 lines
888 B
Plaintext

function Node_RM_Primitive(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor {
name = "RM Sphere";
inputs[| 0] = nodeValue("Dimension", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, DEF_SURF)
.setDisplay(VALUE_DISPLAY.vector);
outputs[| 0] = nodeValue("Surface Out", self, JUNCTION_CONNECT.output, VALUE_TYPE.surface, noone);
input_base_length = ds_list_size(inputs);
input_display_list = [ 0 ];
static drawOverlay = function(hover, active, _x, _y, _s, _mx, _my, _snx, _sny) {}
static step = function() {}
static processData = function(_outSurf, _data, _output_index, _array_index = 0) {
var _dim = _data[0];
_outSurf = surface_verify(_outSurf, _dim[0], _dim[1]);
surface_set_shader(_outSurf, sh_rm_primitive);
draw_sprite_stretched(s_fx_pixel, 0, 0, 0, _dim[0], _dim[1]);
surface_reset_shader();
return _outSurf;
}
}