2023-09-11 16:08:58 +02:00
|
|
|
function Node_DynaSurf_Out(_x, _y, _group = noone) : Node_PCX(_x, _y, _group) constructor {
|
2023-09-13 15:06:39 +02:00
|
|
|
name = "Output";
|
|
|
|
color = COLORS.node_blend_dynaSurf;
|
2023-09-11 16:08:58 +02:00
|
|
|
|
|
|
|
manual_deletable = false;
|
|
|
|
destroy_when_upgroup = true;
|
|
|
|
|
2024-08-20 10:15:53 +02:00
|
|
|
newInput(0, nodeValue("Surface", self, CONNECT_TYPE.input, VALUE_TYPE.PCXnode, noone));
|
2023-09-11 16:08:58 +02:00
|
|
|
|
2024-08-20 10:15:53 +02:00
|
|
|
newInput(1, nodeValue("x", self, CONNECT_TYPE.input, VALUE_TYPE.PCXnode, noone));
|
2023-09-11 16:08:58 +02:00
|
|
|
|
2024-08-20 10:15:53 +02:00
|
|
|
newInput(2, nodeValue("y", self, CONNECT_TYPE.input, VALUE_TYPE.PCXnode, noone));
|
2023-09-11 16:08:58 +02:00
|
|
|
|
2024-08-20 10:15:53 +02:00
|
|
|
newInput(3, nodeValue("sx", self, CONNECT_TYPE.input, VALUE_TYPE.PCXnode, noone));
|
2023-09-11 16:08:58 +02:00
|
|
|
|
2024-08-20 10:15:53 +02:00
|
|
|
newInput(4, nodeValue("sy", self, CONNECT_TYPE.input, VALUE_TYPE.PCXnode, noone));
|
2023-09-11 16:08:58 +02:00
|
|
|
|
2024-08-20 10:15:53 +02:00
|
|
|
newInput(5, nodeValue("angle", self, CONNECT_TYPE.input, VALUE_TYPE.PCXnode, noone));
|
2023-09-11 16:08:58 +02:00
|
|
|
|
2024-08-20 10:15:53 +02:00
|
|
|
newInput(6, nodeValue("color", self, CONNECT_TYPE.input, VALUE_TYPE.PCXnode, noone));
|
2023-09-11 16:08:58 +02:00
|
|
|
|
2024-08-20 10:15:53 +02:00
|
|
|
newInput(7, nodeValue("alpha", self, CONNECT_TYPE.input, VALUE_TYPE.PCXnode, noone));
|
2023-09-11 16:08:58 +02:00
|
|
|
|
2024-08-08 06:57:51 +02:00
|
|
|
outputs[0] = nodeValue_Output("PCX", self, VALUE_TYPE.PCXnode, noone)
|
2023-09-13 15:06:39 +02:00
|
|
|
.setVisible(false);
|
2023-09-11 16:08:58 +02:00
|
|
|
|
|
|
|
input_display_list = [ 0,
|
|
|
|
["Transform", false], 1, 2, 3, 4, 5,
|
|
|
|
["Draw", false], 6, 7,
|
|
|
|
];
|
|
|
|
|
2023-09-13 16:24:01 +02:00
|
|
|
static getNextNodes = method(self, dynaSurf_output_getNextNode);
|
|
|
|
|
|
|
|
static setRenderStatus = function(result) {
|
|
|
|
rendered = result;
|
|
|
|
if(group) group.setRenderStatus(result);
|
|
|
|
}
|
|
|
|
|
2023-09-11 16:08:58 +02:00
|
|
|
static update = function() {
|
2023-10-02 08:57:44 +02:00
|
|
|
var _surf = getInputData(0);
|
|
|
|
var _x = getInputData(1);
|
|
|
|
var _y = getInputData(2);
|
|
|
|
var _sx = getInputData(3);
|
|
|
|
var _sy = getInputData(4);
|
|
|
|
var _ang = getInputData(5);
|
|
|
|
var _clr = getInputData(6);
|
|
|
|
var _alp = getInputData(7);
|
2023-09-11 16:08:58 +02:00
|
|
|
|
2024-08-08 06:57:51 +02:00
|
|
|
outputs[0].setValue(new __funcTree("draw", [ _surf, _x, _y, _sx, _sy, _ang, _clr, _alp ]));
|
2023-09-13 15:06:39 +02:00
|
|
|
|
|
|
|
if(group) group.setDynamicSurface();
|
2023-09-11 16:08:58 +02:00
|
|
|
}
|
|
|
|
}
|