Pixel-Composer/scripts/node_fn_constant/node_fn_constant.gml

25 lines
542 B
Plaintext
Raw Normal View History

2024-05-31 12:51:14 +02:00
function Node_Fn_Constant(_x, _y, _group = noone) : Node_Fn(_x, _y, _group) constructor {
name = "Constant";
2024-08-18 06:16:20 +02:00
newInput(inl + 0, nodeValue_Float("Value", self, 0 ));
2024-05-31 12:51:14 +02:00
array_append(input_display_list, [
["Value", false], inl + 0
]);
value = 0;
static __fnEval = function(_x = 0) {
return value;
}
static processData = function(_output, _data, _output_index, _array_index = 0) { #region
value = _data[inl + 0];
var val = __fnEval(CURRENT_FRAME / TOTAL_FRAMES);
text_display = val;
return val;
} #endregion
}