2023-09-08 21:37:36 +02:00
|
|
|
function Node_IsoSurf(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor {
|
|
|
|
name = "IsoSurf";
|
|
|
|
|
|
|
|
inputs[| 0] = nodeValue("Direction", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0)
|
|
|
|
.setDisplay(VALUE_DISPLAY.enum_button, [ "4", "8" ]);
|
|
|
|
|
|
|
|
inputs[| 1] = nodeValue("Surfaces", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, noone)
|
|
|
|
.setVisible(true, true)
|
|
|
|
.setArrayDepth(1);
|
|
|
|
|
2023-09-09 13:52:16 +02:00
|
|
|
inputs[| 2] = nodeValue("Angle Shift", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0)
|
|
|
|
.setDisplay(VALUE_DISPLAY.rotation);
|
|
|
|
|
2023-09-08 21:37:36 +02:00
|
|
|
outputs[| 0] = nodeValue("IsoSurf", self, JUNCTION_CONNECT.output, VALUE_TYPE.dynaSurf, noone);
|
|
|
|
|
|
|
|
input_display_list = [
|
2023-09-09 13:52:16 +02:00
|
|
|
["Isometric", false], 0, 2,
|
2023-09-08 21:37:36 +02:00
|
|
|
["Surfaces", false], 1,
|
|
|
|
];
|
|
|
|
|
|
|
|
static processData = function(_outSurf, _data, _output_index, _array_index) {
|
2023-09-09 13:52:16 +02:00
|
|
|
var _type = _data[0];
|
|
|
|
var _surf = _data[1];
|
|
|
|
var _angle = _data[2];
|
|
|
|
var _amo = _type == 0? 4 : 8;
|
2023-09-08 21:37:36 +02:00
|
|
|
|
2023-09-09 13:52:16 +02:00
|
|
|
var _iso = _type == 0? new dynaSurf_iso_4() : new dynaSurf_iso_8();
|
2023-09-08 21:37:36 +02:00
|
|
|
for( var i = 0; i < _amo; i++ )
|
|
|
|
_iso.surfaces[i] = array_safe_get(_surf, i, noone);
|
2023-09-09 13:52:16 +02:00
|
|
|
_iso.angle = _angle;
|
2023-09-08 21:37:36 +02:00
|
|
|
|
|
|
|
return _iso;
|
|
|
|
}
|
|
|
|
}
|